CentOS修改yum源为阿里镜像源

CentOS修改yum源为阿里镜像源

1、备份原来的文件

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

2、进入 cd /etc/yum.repos.d/

cd /etc/yum.repos.d/

3、下载配置文件

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

4、清理缓存并生成新的缓存

yum clean all
yum makecache
原文地址:https://www.cnblogs.com/xwxz/p/13458084.html