首先关闭官方的fastmirrors关了vi /etc/yum/pluginconf.d/fastestmirror.conf修改enable=0或者执行以下命令sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf把之前的repo挪到备份mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak替换为阿里云vault镜像（国内服务器用）curl -o /etc/yum.repos.d/CentOS-Base.repo https://tools.guo.work/linux/centos6yum/Centos-6-Vault-Aliyun.repo替换为官方vault源（国外服务器用）curl -o /etc/yum.repos.d/CentOS-Base.repo https://tools.guo.work/linux/centos6yum/Centos-6-Vault-Official.repo最后为了检测这一次yum的源是否是成功的，使用下面的命令来进行测试yum grouplist