zoukankan      html  css  js  c++  java
  • CentOS6官方不维护了,更新怎么办?

    你的centos6/7是不是不能使用了,报404 not found错?

    一、修改yum源为aliyun源

    #备份CentOS-Base.repo
    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
    
    #修改yum源
    #CentOS6为:
    wget -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
    
    #Centos7为:
    wget -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

    二、修改CentOS-Base.repo配置

    #备份配置文件
    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak2
    
    #修改配置
    vim /etc/yum.repos.d/CentOS-Base.repo
    
    [centos-office]
    name=centos-office
    failovermethod=priority
    baseurl=https://vault.centos.org/6.10/os/x86_64/
    gpgcheck=1
    gpgkey=https://vault.centos.org/6.10/os/x86_64/RPM-GPG-KEY-CentOS-6

    三、测试

    #清空yum缓存
    yum clean all
    
    #重建yum缓存
    yum makecache
    
    #列出yum列表
    yum list
    欢迎关注我的公众号:云栖语,不一样的研发视界。
    云栖语微信公众号:change-1978
  • 相关阅读:
    idea 相关
    dns 相关
    bash 相关
    建造者模式(Builder)
    C#中out 及 ref 区别
    C# 2.0新特性
    Asp.net.Ajax控件学习
    装饰模式(Decorator Pattern)
    职责链模式(Chain of Responsibility Pattern)
    面向对象
  • 原文地址:https://www.cnblogs.com/hunttown/p/14763989.html
Copyright © 2011-2022 走看看