更换centos7源
yum install wget -y
cd /etc/yum.repos.d && for r in *.repo; do mv $r $r.bak;done
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
修改CentOS-Base.repo文件中的$releasever全部替换为版本号 7
yum clean all
yum makecache
yum update -y