忘記轉載哪裡了
1、mkdir /mnt/cdrom
2 mount /dev/cdrom /mnt/cdrom #掛著鏡像,光盤
3 mkdir /home/redhat-iso
4 cp -Rf /mnt/cdrom/* /home/redhat-iso #將光盤內的內容copy到某個路徑下
cd /etc/yum.repos.d/
touch rhel-media.repo
cat > /etc/yum.repos.d/rhel-media.repo<< EOF
[media]
name=Red Hat Enterprise Linux 6.0
baseurl=file:///home/redhat-iso
enabled=1
gpgcheck=1
gpgkey=file:///home/redhat-iso/RPM-GPG-KEY-redhat-release
EOF
yum clean all
yum makecache
本文出自 “11532796” 博客,請務必保留此出處http://11542796.blog.51cto.com/11532796/1827511