更换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
posted @ 2019-05-06 16:14  qcuser  阅读(202)  评论(0编辑  收藏  举报