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

    或者这个方法

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

  • 相关阅读:
    题解:SPOJ1026 Favorite Dice
    机器学习笔记
    机器学习第二次作业
    机器学习第一次作业
    2019软工实践总结作业
    软工2019作业6——软件评测
    2019软工作业五-实现师门树
    软件工程 “校园汇” 个人IDEA竞选分析与总结
    软工2019作业四
    软工2019作业三
  • 原文地址:https://www.cnblogs.com/ccielife/p/14103393.html
Copyright © 2011-2022 走看看