安装光盘本地YUM更新源
挂载安装光盘:
mount /dev/cdrom /mnt
vi /etc/yum.repos.d/local.repo
修改本地更新源文件,添加内容:
[HightAvailability]
name=HightAvailability
baseurl=file:///mnt/HighAvailability
enable=1
gpgcheck=0
[LoadBalancer]
name=LoadBalancer
baseurl=file:///mnt/LoadBalancer
enable=1
gpgcheck=0
[Server]
name=Server
baseurl=file:///mnt/Server
enable=1
gpgcheck=0
PS:CentOS6.1更换为yum光盘源
#mkdir /media/CentOS
#mount /dev/cdrom /media/CentOS
测试
#yum --disablerepo=* --enablerepo=c6-media install gcc
成功。
Installed:
gcc.i686 0:4.4.5-6.el6
Dependency Installed:
cloog-ppl.i686 0:0.15.7-1.2.el6 cpp.i686 0:4.4.5-6.el6
glibc-devel.i686 0:2.12-1.25.el6 glibc-headers.i686 0:2.12-1.25.el6
kernel-headers.i686 0:2.6.32-131.0.15.el6 libgomp.i686 0:4.4.5-6.el6
mpfr.i686 0:2.4.1-6.el6 ppl.i686 0:0.10.2-11.el6
Complete!