【六袆-linux】Cetos8更换国内源 >_- 阿里源

1.back

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

2.download base-centos8.repo

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo

 

3.replace

sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo

 

4.cmd 

makecache

 

5.不建议使用命令 yum update 

posted @ 2022-04-26 00:54  你好,Alf  阅读(14)  评论(0编辑  收藏  举报