掛在本地鏡像到 mnt目錄下
mount /dev/sr0 /mnt
mount 查看是否掛在成功
cd /etc/yum.repos.d
cp rhel-source.repo rhel-localhost.repo
vim rhel-localhost.repo
[rhel-localhost]
name=localhostyum
baseurl=file:///mnt/
enable=1
gpgcheck=0
保存退出
yum clean all
yum repolist