- #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 或者直接删除,否则yumlist会报错如下:
rhel6 Error: Cannot retrieve repository metadata (repomd.xml) for repository: InstallMedia. Please verify its path and try again
#yum clean all
测试
[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