Centos7更改yum源
1.进入目录
cd /etc/yum.repos.d/
2.备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
3.下载想要的源
#下载阿里云的源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
4.清楚旧缓存数据,建立新的缓存
yum clean all
yum makecache