Centos8可用的repo文件下载yum源文件

玩技站长 运维笔记1 634字数 244阅读0分48秒阅读模式

centos8不更新了,导致好多软件也装不了,连wget也安装不了

删除yum.repos.d 下的所以文件

rm -rf /etc/yum.repos.d/*

新建repo文件

[root@centos8-hkping /]#vim /etc/yum.repos.d/Centos-8.repo
[BaseOS]
name=CentOS-$releasever - Base
baseurl=http://mirrors.cloud.tencent.com/centos/$releasever/BaseOS/$basearch/os/
       http://mirrors.163.com/centos/$releasever/BaseOS/$basearch/os/
       https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/BaseOS/$basearch/os/
       https://mirrors.ustc.edu.cn/centos/$releasever/BaseOS/$basearch/os/
       https://repo.huaweicloud.com/centos/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
[AppStream]
name=CentOS-$releasever - AppStream
baseurl=http://mirrors.cloud.tencent.com/centos/$releasever/AppStream/$basearch/os/
       http://mirrors.163.com/centos/$releasever/AppStream/$basearch/os/
       https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/AppStream/$basearch/os/
       https://mirrors.ustc.edu.cn/centos/$releasever/AppStream/$basearch/os/
       https://repo.huaweicloud.com/centos/$releasever/AppStream/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
[epel]
name=CentOS-$releasever Extra Packages - $basearch
baseurl=https://mirrors.cloud.tencent.com/epel/$releasever/Everything/$basearch/
       https://mirrors.tuna.tsinghua.edu.cn/epel/$releasever/Everything/$basearch/
       http://mirrors.ustc.edu.cn/epel/$releasever/Everything/$basearch/
       https://repo.huaweicloud.com/epel/$releasever/Everything/$basearch/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8

重建缓存

yum clean all && yum makecache
文章源自玩技e族-https://www.playezu.com/128944.html文章源自玩技e族-https://www.playezu.com/128944.html
 最后更新:2022-5-27
    • 官方账号
      官方账号

      将[Base]下面所有的地址都复制包括[Base]

    匿名

    发表评论

    匿名网友
    确定

    拖动滑块以完成验证