RHEL 6 配置yum源,可以把DVD光盘里的软件包复制到硬盘上,然后设置一个本地安装源,参照如下的步骤操作。

#cat>/etc/yum.repos.d/local.repo<<EOF
[local]
name=local
baseurl=file:///opt/rhel-6
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
EOF
#mount -t iso9660 -o ro /dev/sr0 /mnt
#rsync -arl /mnt/* /opt/rhel-6/
#cp /mnt/RPM-GPG-KEY-redhat-release /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
#yum clean all
#yum list