CentOS镜像使用帮助

地址

http://mirrors.cqu.edu.cn/CentOS

说明

CentOS软件源

收录框架

  • x86_64
  • i386

    收录版本

  • CentOS 5

  • CentOS 6

  • CentOS 7

  • CentOS 8

    使用说明

    首先备份CentOS-Base.repo:

    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
    

    然后查看CentOS版本:

    cat /etc/system-release
    

    根据版本号下载相应文件到指定目录:
    CentOS 5:

    wget   -O   /etc/yum.repos.d/CentOS-Base.repo  http://mirrors.cqu.edu.cn/repo/centos/Centos-5.repo
    

    CentOS 6:

    wget   -O   /etc/yum.repos.d/CentOS-Base.repo  http://mirrors.cqu.edu.cn/repo/centos/Centos-6.repo
    

    CentOS 7:

    wget   -O   /etc/yum.repos.d/CentOS-Base.repo  http://mirrors.cqu.edu.cn/repo/centos/Centos-7.repo
    

    CentOS 8

    # CentOS-Base
    wget   -O   /etc/yum.repos.d/CentOS-Base.repo  http://mirrors.cqu.edu.cn/repo/centos/Centos-8-repo/CentOS-Base.repo
    # CentOS-Extra
    wget   -O   /etc/yum.repos.d/CentOS-Extras.repo  http://mirrors.cqu.edu.cn/repo/centos/Centos-8-repo/CentOS-Extras.repo
    # CentOS-AppStream
    wget   -O   /etc/yum.repos.d/CentOS-AppStream.repo  http://mirrors.cqu.edu.cn/repo/centos/Centos-8-repo/CentOS-AppStream.repo
    

    有些情况下系统没有预装wget程序,请提前进行安装。

    然后刷新yum缓存:

    yum makecache
    

    相关链接

    官方主页:https://www.centos.org/