由于 centos6 与2020年11月30日不再有官方维护, 因此国内镜像源也可以说失效了, 现在需要换个源去处理

1、关闭fastestmirror

1
2
3
vi /etc/yum/pluginconf.d/fastestmirror.conf
#修改参数
enable=0

2、将原来的源改名,养成良好的备份习惯

1
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

3、更换源

1
2
3
4
5
#替换为官方Vault源
wget -O /etc/yum.repos.d/CentOS-Base.repo https://static.lty.fun/%E5%85%B6%E4%BB%96%E8%B5%84%E6%BA%90/SourcesList/Centos-6-Vault-Official.repo

#替换为阿里云Vault镜像
wget -O /etc/yum.repos.d/CentOS-Base.repo https://static.lty.fun/%E5%85%B6%E4%BB%96%E8%B5%84%E6%BA%90/SourcesList/Centos-6-Vault-Aliyun.repo

文章原文