1、进入/etc/yum.repos.d文件夹中,把本机的repo为后缀的文件做一个备份,可以选择把这些文件放入一个文件夹里(反正也用不着)
2、在这个yum.repos.d文件夹中,新建一个名为CentOS-Base.repo(跟之前的文件名称一样,其实是否一样无所谓的)的文件,写入下列配置
[base]
name=CentOS-$releasever - Base
failovermethod=priority
baseurl=https://vault.centos.org/centos/$releasever/os/$basearch/
gpgcheck=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
# released updates
[updates]
name=CentOS-$releasever - Updates
failovermethod=priority
baseurl=https://vault.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
修改完配置文件后,执行下列命令,保证yum源生效
yum clean all
yum makecache
yum update
标签: centos6 Centos 6 更新源
还木有评论哦,快来抢沙发吧~