为了加快yum的下载速度,我们可以讲yum源指向阿里云的资源。
操作方法:
1.备份系统的yum源
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 makecache生成缓存
4.vi /etc/yum.repos.d/CentOS-Base.repo 查看更改。