zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    小白安装使用Redis
    Mysql的Sql语句优化
    maximo入门----用户使用提要
    时不时刷刷BOSS 看看技术需求
    2019.7.10整理
    docker使用入门
    docker之windows安装&centOS安装
    HashTable学习
    Hashmap学习
    红黑树学习
  • 原文地址:https://www.cnblogs.com/xzlive/p/14177073.html
Copyright © 2011-2022 走看看