网络源地址:http://mirrors.163.com/.help/centos.html
1.先把本地的源配置文件备份
mv/etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2.下载对应的repo文件,放入/etc/yum.repos.d/目录下
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
运行以下命令生成缓存
yum clean all
yum makecache (cashi 高速缓存)