- 如果Centos系统没有安装wget软件,在换源之前先安装wget
yum install -y wget
- 通过改名的方式备份源文件
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
4. 将服务器上的软件包信息在本地缓存,以提高搜索和安装软件的速度
5、这时候再更新系统就会看到以下mirrors.aliyun.com信息 ```shell [root@instance-7degfn ~]# yum -y update 已加载插件:fastestmirror, product-id, search-disabled-repos, subscription-manageryum makecache
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
- base: mirrors.aliyun.com
- epel: mirrors.bfsu.edu.cn
- extras: mirrors.aliyun.com
- updates: mirrors.aliyun.com
正在解决依赖关系
```
6、最终效果yum安装可以达到几M每秒(yum安装docker)


