1、通过执行如下命令修改fastestmirror.conf的配置参数
sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf
2、备份文件
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
3、如果是香港服务器或者海外,替换为官方Vault源
curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Official.repo
如果是国内建议使用阿里云,执行如下
curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo
原文链接:https://blog.csdn.net/fly19920602/article/details/114320181