Centos7 更换阿里 yum 源

39 阅读1分钟

1. 删除原本yum源配置文件

执行命令:rm -rf /etc/yum.repos.d/*

2. 下载阿里yum源配置文件

执行命令:curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3. 清除并生成缓存

yum clean all
yum makecache