Centos7 更換阿里源

walkersss發表於2024-09-10

Centos7 更換阿里源

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

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

yum clean all
yum makecache

網易
備份當前的yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup


下載對應版本repo檔案, 放入/etc/yum.repos.d/
http://mirrors.163.com/.help/CentOS7-Base-163.repo
http://mirrors.163.com/.help/CentOS6-Base-163.repo
http://mirrors.163.com/.help/CentOS5-Base-163.repo

生成快取
yum clean all
yum makecache

相關文章