CentOS8自建多源yum仓库repo

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

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

/etc/yum.repos.d/*.*

新建repo文件

vi /etc/yum.repos.d/sunmy.repo

复制粘贴

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=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8

:wq 保存

重建缓存

yum clean all && yum makecache

posted @ 2022-03-28 17:15  幽见〆南山  阅读(310)  评论(0编辑  收藏  举报