centos7换国内源

1.备用源

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2.换源

cd /etc/yum.repos.d

wget  http://mirrors.aliyun.com/repo/Centos-7.repo

wget  http://mirrors.163.com/.help/CentOS7-Base-163.repo

3.清除及生成缓存

yum clean all 

yum makecache

结束。

posted @ 2020-05-14 17:39  巴州夜雨  阅读(1477)  评论(0编辑  收藏  举报