網絡源地址:http://mirrors.163.com/.help/centos.htmlhtml
1.先把本地的源配置文件備份centos
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.repohtm
運行如下命令生成緩存get
yum clean all配置
yum makecache (cashi 高速緩存)下載