By default, no yum source exists in the initial installation of RHEL7.0. mount a local DVD to/mnt/cdrom and connect the system yum source to/mnt/cdrom. # Using yum-config-manager to generate a source file template [root@server0yum.repos.d] # yum-config-manager -- add-repo = cdromLoadedplugins: langpacks, product-idadd
By default, no yum source exists in the initial installation of RHEL7.0. mount a local DVD to/mnt/cdrom and connect the system yum source to/mnt/cdrom.
# Use yum-config-manager to generate a source file template
[Root @ server0 yum. repos. d] #Yum-config-manager -- add-repo = cdrom
Loaded plugins: langpacks, product-id
Adding repo from: cdrom
[Cdrom]
Name = added from: cdrom
Baseurl = cdrom
Enabled = 1
# Edit the generated template as follows:
[Root @ server0 yum. repos. d] #Cat cdrom. repo
[Cdrom]
Name = DVD Media
Baseurl = file: // mnt/cdrom
Enabled = 1
# Attaching CDROM
[Root @ server0 yum. repos. d] #Mount/dev/cdrom/mnt/cdrom/
Mount:/dev/sr0 is write-protected, mounting read-only
# Import RPM-GPG-KEY
[Root @ server0 yum. repos. d] #Rpm -- import/etc/pki/rpm-gpg/RPM-GPG-KEY-RedHat-xxxx
# View
[Root @ server0 ~] #Yum repolist
Loaded plugins: langpacks, product-id, submodules-manager
This system is not registered to Red Hat sub‑management. You can use sub‑manager to register.
Repo id repo name status
Cdrom, DVD Media 4,305
Repolist: 4,305
For more YUM tutorials, see the following content::
RedHat 6.2 Linux modify yum source free use CentOS source http://www.linuxidc.com/Linux/2013-07/87383.htm
Configure epel yum source http://www.linuxidc.com/Linux/2012-10/71850.htm
Redhat local yum source configuration http://www.linuxidc.com/Linux/2012-11/75127.htm
Yum profile description http://www.linuxidc.com/Linux/2013-04/83298.htm
Install yum http://www.linuxidc.com/Linux/2013-06/86535.htm in RedHat 6.1
YUM installation and cleaning http://www.linuxidc.com/Linux/2013-07/87163.htm
Build yum local ground source http://www.linuxidc.com/Linux/2014-07/104533.htm on CentOS 6.4
For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10
Expand full text
This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-12/1260.htm