cd /etc/yum.repo.d/
删除repo文件,或者自己备份
rm -rf /etc/yum.repos.d/*.repo
mkdir bak;mv ./*.repo bak/
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum makecache
更新缓存