一、系统版本

centos7.9

二、选择源

ping 163.com
64 bytes from 123.58.180.8 (123.58.180.8): icmp_seq=1 ttl=51 time=115 ms
64 bytes from 123.58.180.8 (123.58.180.8): icmp_seq=2 ttl=51 time=107 ms
64 bytes from 123.58.180.8 (123.58.180.8): icmp_seq=3 ttl=51 time=109 ms
64 bytes from 123.58.180.8 (123.58.180.8): icmp_seq=4 ttl=51 time=108 ms
64 bytes from 123.58.180.8 (123.58.180.8): icmp_seq=5 ttl=51 time=107 ms
ping aliyun.com
64 bytes from 140.205.60.46 (140.205.60.46): icmp_seq=1 ttl=32 time=110 ms
64 bytes from 140.205.60.46 (140.205.60.46): icmp_seq=2 ttl=32 time=111 ms
64 bytes from 140.205.60.46 (140.205.60.46): icmp_seq=3 ttl=32 time=116 ms
64 bytes from 140.205.60.46 (140.205.60.46): icmp_seq=4 ttl=32 time=107 ms
64 bytes from 140.205.60.46 (140.205.60.46): icmp_seq=5 ttl=32 time=107 ms

阿里云经过的路由数量(ttl)少,网易延迟(time)低

三、更换源

1、备份原下载源

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

2、更换源

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

3、清理缓存

yum clean all
yum makecache

四、使用新源

yum install -y

五、Tips

tar.gz 解压

tar -zxvf 
Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐