1、下載新的 CentOS-Base.repo 到 /etc/yum.repos.d/ 。
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
2、更新鏡像源。
清除緩存
yum clean all
生成緩存
yum makecache