步骤:
-
关闭fastestmirror
vi /etc/yum/pluginconf.d/fastestmirror.conf
修改参数:
enable=0
-
备份原源文件
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
-
更换源
-
如选择官方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
-
Centos官方的Vault地址:vault.centos.org/
-
阿里云Vault镜像地址:mirrors.aliyun.com/centos-vault/
-
当然,如果你使用的是阿里云的云服务器,参考阿里云提供的内部方案:https://help.aliyun.com/document_detail/193569.htm
-
如果你使用的腾讯云的服务器,可以将源文件(CentOS-Base.repo)里的链接域名替换成腾讯云提供的临时地址:mirrors.cloud.tencent.com
-
-
最后
yum makecache
-
Anyway,可能的话尽量升级到CentOS 7,毕竟以后如果CentOS出现漏洞啥的,不会再有修复了。
网友评论