更换 CentOS 7 的下载源为阿里云
2019-11-23 本文已影响0人
王侦
step1.备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
step2.下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
step3.之后运行yum makecache生成缓存
更新后,速度有明显提升,由30k提升到600k:
![](https://img.haomeiwen.com/i4222138/2f81619a90c4496f.jpg)