1.挂载盘
[root@rac01 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_rac01-LogVol01
37G 4.4G 31G 13% /
tmpfs 3.9G 76K 3.9G 1% /dev/shm
/dev/sda1 477M 40M 412M 9% /boot
/dev/sr0 3.7G 3.7G 0 100% /media/RHEL-6.8 Server.x86_64
[root@rac01 yum.repos.d]# mount /dev/sr0 /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only
2.修改yum源
[root@rac01 mnt]# cd /etc/yum.repos.d/
[root@rac01 yum.repos.d]# vim rhel-source.repo
[rhel68]
name=rhel68 repo
baseurl=file:///mnt/Server
gpgcheck=0
3.更新yum
[root@rac01 yum.repos.d]# yum clean all
Loaded plugins: product-id, refresh-packagekit, search-disabled-repos, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning repos: rhel68
Cleaning up Everything
[root@rac01 yum.repos.d]# yum list | grep zsh
zsh.x86_64 4.3.11-4.el6_7.2 rhel68