1.挂载系统安装盘
2.复制安装盘
mkdir /mnt/iso
cp -r /media/RHEL_6.3\ x86_64\ Disc\ 1/* /mnt/iso
3.配置yum源
备份
cp rhel-source.repo rhel-source.repo.bak
修改
mv rhel-source.repo iso-source.repo
vim iso-source.repo
[iso-source] name=Red Hat Enterprise Linux $releasever - $basearch - Source baseurl=file:///mnt/iso enabled=1 gpgcheck=0 gpgkey=file:///mnt/iso/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
刷新yum
[root@js yum.repos.d]# yum clean all Loaded plugins: product-id, refresh-packagekit, security, subscription-manager Updating certificate-based repositories. Unable to read consumer identity Cleaning repos: InstallMedia iso-source Cleaning up Everything [root@js yum.repos.d]# yum makecache Loaded plugins: product-id, refresh-packagekit, security, subscription-manager Updating certificate-based repositories. Unable to read consumer identity iso-source | 4.0 kB 00:00 ... iso-source/filelists_db | 3.7 MB 00:00 ... iso-source/primary_db | 3.1 MB 00:00 ... iso-source/other_db | 1.6 MB 00:00 ... iso-source/group_gz | 204 kB 00:00 ... Metadata Cache Created
OK
来源:https://www.cnblogs.com/jusonsummer/p/4842508.html