美文网首页
更换 CentOS 7 的下载源为阿里云

更换 CentOS 7 的下载源为阿里云

作者: 王侦 | 来源:发表于2019-11-23 14:55 被阅读0次

step1.备份

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

step2.下载新的CentOS-Base.repo 到/etc/yum.repos.d/

CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

step3.之后运行yum makecache生成缓存

更新后,速度有明显提升,由30k提升到600k:


相关文章

网友评论

      本文标题:更换 CentOS 7 的下载源为阿里云

      本文链接:https://www.haomeiwen.com/subject/heshwctx.html