备份默认源文件
进入yum.repos.d文件夹
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.backup
下载yum源
网易源
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
阿里源
wget http://mirrors.aliyun.com/repo/Centos-7.repo
更新yum
生成缓存
yum makecache