1.挂载
[root@localhost cdrom]# mount -o loop /u01/Red\ Hat\ Enterprise\ 6.5\ x86_64.iso /mnt/cdrom
2.vi rhel-source.repo
[root@localhost yum.repos.d]# cat rhel-source.repo
[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
baseurl=file:///mnt/cdrom
enabled=1
gpgcheck=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release
3.
sed -i "s#remote = url + '/' + relative#remote = '/mnt/cdrom' + '/' +
relative#g" /usr/lib/python2.6/site-packages/yum/yumRepo.py
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26937943/viewspace-1982159/
,如需转载,请注明出处,否则将追究法律责任。