Centos6.5使用光盘作为本地的yum源
主要是用于无法连接外网的CentOS6.5服务器
mkdir /mnt/cdrom
挂载光驱ISO文件
[root@www~]# mount /dev/cdrom /mnt/cdrom/
[root@www ~]# cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
编辑yum文件
[root@www ~]# vim /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-$releasver - Base
baseurl=file:///mnt/cdrom/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$releasver - Updates
baseurl=file:///mnt/cdrom/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
...
[root@localhost ~]# yum clean all (清除缓存)
[root@localhost ~]# yum makecache (建立新缓存)
就可以了的说