centos7更换镜像源

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

posted @ 2020-09-07 21:19  taotaozh  阅读(1107)  评论(0编辑  收藏  举报