Centos系列更换Yum源办法

阿里网站:repo安装包下载_开源镜像站-阿里云 (aliyun.com)

Centos Stream 8

1
2
3
4
5
mkdir repo.bak
mv /etc/yum.repos.d/* repo.bak/
wget -O /etc/yum.repos.d/CentOS-Stream-AppStream.repo https://mirrors.aliyun.com/repo/centos-stream/8/CentOS-Stream-AppStream.repo
wget -O /etc/yum.repos.d/CentOS-Stream-BaseOS.repo https://mirrors.aliyun.com/repo/centos-stream/8/CentOS-Stream-BaseOS.repo
dnf clean all && dnf makecache

Centos 7

1
2
3
4
mkdir repo.bak
mv /etc/yum.repos.d/* repo.bak/
wget -O /etc/yum.repos.d/Centos-7.repo https://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all && yum makecache

Centos 8

1
2
3
4
mkdir repo.bak
mv /etc/yum.repos.d/* repo.bak/
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
yum clean all && yum makecache
特别声明
千屹博客旗下的所有文章,是通过本人课堂学习和课外自学所精心整理的知识巨著
难免会有出错的地方
如果细心的你发现了小失误,可以在下方评论区告诉我,或者私信我!
非常感谢大家的热烈支持!