RHEL7.0 configure CD-ROM as local YUM
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:
RedHat 6.2 modify yum source in Linux use CentOS source for free
Configure the epel yum Source
Redhat local yum source configuration
Description of yum configuration file
Install yum in RedHat 6.1)
YUM installation and cleaning
Build yum local source on CentOS 6.4