Linux:yum 加速
使用 CentOS 自带的 yum 源安装软件时,发现下载速度很慢,于是决定换成阿里的 yum 源来加速。
1、进入 /etc/yum.repos.d/,备份 CentOS-Base.repo
# cd /etc/yum.repos.d/
# mv CentOS-Base.repo CentOS-Base.repo.bak
2、下载阿里云的 yum 源
# wget -O 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
3、刷新缓存
# yum clean all
# yum makecache
最后再通过 yum 安装一下软件试试,看看是不是速度快了很多。