CentOS更换YUM源
2019-11-01 09:19:03

Centos更换yum下载源方法


Centos 5-6-7更换源版本号后下载即可

rm -rf /etc/yum.repos.d/Centos-Base.repo

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

yum makecache



Centos 8

rm -f /etc/yum.repos.d/CentOS-Base.repo CentOS-AppStream.repo CentOS-PowerTools.repo CentOS-centosplus.repo CentOS-Extras.repo 

curl -o CentOS-Base.repo https://raw.githubusercontent.com/hackyoMa/docker-centos/8/CentOS-Base.repo

yum makecache