标签:ase bak vim cal ble base inux nbsp 网络
一、挂载光盘
[root@localhost ~]# mount /dev/cdrom /mnt/cdrom/
二、让网络yum源文件失效
[root@localhost]@ cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# mv CentOS-Base.repo \
CentOS-Base.repo.bak
[root@localhost yum.repos.d]# mv CentOS-Debuginfo.repo \
CentOS-Debuginfo.repo.bak
[root@localhost yum.repos.d]# mv CentOS-Vault.repo \
CentOS-Vault.repo.bak
三、修改光盘yum源文件
[root@localhost yum.repos.d]# vim CentOS-Media.repo
[c6-media]
name=CentOS-Sreleascver - Media
baseurl=file:///mnt/cdrom
#地址为你自己的光盘挂载地址
# file:///media/cdrom/
# file:///media/cdrecorder/
#注释这两个不存在的地址
gpgcheck=1
enabled=1
#把enabled=0改为enabled=1,让这个yum源配置文件生效
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
标签:ase bak vim cal ble base inux nbsp 网络
原文地址:https://www.cnblogs.com/wsx123/p/14007568.html