# Setenforce0 # mkdir/yum # mount-oloop/dev/cdrom/mnt # cp-ar/mnt/*/yum # vi/etc/yum. repos. d/local. repo [local] nameRedHatEnterpriseLinuxupdate6baseurlfile: // yum/gpgche ..
# Setenforce 0
# Mkdir/yum
# Mount-o loop/dev/cdrom/mnt
# Cp-ar/mnt/*/yum
# Vi/etc/yum. repos. d/local. repo
[Local]
Name = Red Hat Enterprise Linux update6
Baseurl = file: // yum/
Gpgcheck = 0
Enabled = 1
# Mv/etc/yum. repos. d/packagekit-media.repo/etc/yum. repos. d/packagekit-media.repo.bk or directly delete, otherwise yumlist will report the following error:
Rhel6 Error: Cannot retrieve repository metadata (repomd. xml) for repository: InstallMedia. Please verify its path and try again
# Yum clean all
Test
[Root @ rhel6 ~] # Yum repolist
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Repo id repo name status
Local Red Hat Enterprise Linux update6 3,391
Repolist: 3,391
This article is from the "learn linux" blog