我发现即使在国外节点的服务器,阿里云的centos镜像源速度仍然是不讲道理的下载速度,对比原来的centos官方的源的速度,快N倍。
  果断换掉破自行车,换飞机。
  删除centos官方源前,请确保已经安装了wget命令,如果已经删源了还没安装wget,可以先恢复官方源,安装wget再删除官方源。
- 恢复官方源: - rpm -Uvh --force http://mirror.centos.org/centos-7/7/os/x86_64/Packages/centos-release-7-7.1908.0.el7.centos.x86_64.rpm - 备注:由于rpm包跟着最新版更新,具体以官网现有的rpm包名字的链接为准,我现在的时间最新版为7.7.1908,如果安装官方报错,可以自行到源站查看最新版包名,把url中的 - centos-release-7-7.1908.0.el7.centos.x86_64.rpm相应版本号改成你在官网看到的版本号即可
- 安装wget
 yum install -y wget
 安装wget之后,就可以把centos官方源换成阿里的。
- 清除yum缓存 - yum clean all 
- 删除官方源 - cd /etc/yum.repos.d && rm -rf ./* 
- 添加阿里云的镜像源和EPEL源 - cd /etc/yum.repos.d && wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
- wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo && yum -y install epel-release
 
- 重新生成缓存 - yum makecache & yum makecache fast 
- 更新软件包,系统 - yum update -y 
- 享受阿里云遍布全球的CDN加速节点
 
                            