美文网首页
CentOS 更换yum源

CentOS 更换yum源

作者: 小淼不卖萌 | 来源:发表于2018-09-25 12:15 被阅读0次

转自: linux 更新yum源 改成阿里云源

1. 备份

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


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

  • CentOS 7

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

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


3. 运行yum makecache生成缓存

相关文章

网友评论

      本文标题:CentOS 更换yum源

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