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

  • 相关阅读:
    构架设计:负载均衡层设计方案(1)——负载场景和解决方式
    ActiveMQ5.14.1+Zookeeper3.4.9高可用伪分布式部署
    TCP同步与异步,长连接与短连接【转载】
    各种加密解密算法的比较和适用场合(转)
    ElasticSearch安装部署,基本配置(Ubuntu14.04)
    OpenResty--mysql,redis 项目中的应用
    mysql慢日志
    MongoDB之Replica Set(复制集复制)
    pycharm的一些设置和快捷键
    jmap
  • 原文地址:https://www.cnblogs.com/xzlive/p/14177073.html
Copyright © 2011-2022 走看看