美文网首页
Centos6被官方结束生命周期后更换源

Centos6被官方结束生命周期后更换源

作者: Jinglever | 来源:发表于2020-12-10 11:27 被阅读0次

    步骤:

    1. 关闭fastestmirror

      vi /etc/yum/pluginconf.d/fastestmirror.conf
      

      修改参数:

      enable=0
      
    2. 备份原源文件

      mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
      
    3. 更换源

      • 如选择官方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

    4. 最后

      yum makecache
      
    5. Anyway,可能的话尽量升级到CentOS 7,毕竟以后如果CentOS出现漏洞啥的,不会再有修复了。

    相关文章

      网友评论

          本文标题:Centos6被官方结束生命周期后更换源

          本文链接:https://www.haomeiwen.com/subject/yjblgktx.html