• centos6.x yum源站失效


    原因:https://wiki.centos.org/About/Product?spm=a2c4g.11174386.n2.3.605e1d82pphpDY%3E

    解决方法:

    1、关闭fastestmirror
    sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf

    2、yum源备份
    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

    3、更新新源
    cat >> /etc/yum.repos.d/CentOS-Base.repo << EOF
    # CentOS-Base.repo
    #
    # The mirror system uses the connecting IP address of the client and the
    # update status of each mirror to pick mirrors that are updated to and
    # geographically close to the client. You should use this for CentOS updates
    # unless you are manually picking other mirrors.
    #
    # If the mirrorlist= does not work for you, as a fall back you can try the
    # remarked out baseurl= line instead.
    #
    #

    [base]
    name=CentOS-6.10 - Base - vault.centos.org
    failovermethod=priority
    baseurl=http://vault.centos.org/6.10/os/$basearch/
    gpgcheck=1
    gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-6

    #released updates
    [updates]
    name=CentOS-6.10 - Updates - vault.centos.org
    failovermethod=priority
    baseurl=http://vault.centos.org/6.10/updates/$basearch/
    gpgcheck=1
    gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-6

    #additional packages that may be useful
    [extras]
    name=CentOS-6.10 - Extras - vault.centos.org
    failovermethod=priority
    baseurl=http://vault.centos.org/6.10/extras/$basearch/
    gpgcheck=1
    gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-6

    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-6.10 - Plus - vault.centos.org
    failovermethod=priority
    baseurl=http://vault.centos.org/6.10/centosplus/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-6

    #contrib - packages by Centos Users
    [contrib]
    name=CentOS-6.10 - Contrib - vault.centos.org
    failovermethod=priority
    baseurl=http://vault.centos.org/6.10/contrib/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-6
    EOF

    或者这个方法

    https://www.getpagespeed.com/server-setup/how-to-fix-yum-after-centos-6-went-eol

  • 相关阅读:
    虚拟机配置桥接网络以及使用mobaxterm连接虚拟机
    maven依赖包问题2
    47.火狐浏览器登录过全球服务器之后,切换回本地服务器登录失败解决方法
    博客园美化
    vue拼图验证(vue-puzzle-vcode)
    vue使用axios
    vue中使用swiper
    VUE安装并配置
    vue中router-view不显示
    vue打包后空白
  • 原文地址:https://www.cnblogs.com/ccielife/p/14103393.html
Copyright © 2020-2023  润新知