如何在 Centos7 中使用阿里云的yum源

4月前 ⋅ 243 阅读

参考 https://www.cnblogs.com/lpbottle/p/7875400.html

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

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

sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo

yum clean all

yum makecache

yum update -y yum install -y vim wget