美文网首页
修改yum为阿里源

修改yum为阿里源

作者: 猪儿打滚 | 来源:发表于2021-04-09 11:28 被阅读0次

背景

1、默认源安装速度慢
2、可能会出现没有可用软件包xxx 错误:无须任何处理的错误

设置为阿里源

  • 首先备份旧的镜像源
    mv /etc/yum.repo.d/Centos-Base.repo /etc/yum.repo.d/Centos-Base.repo.bak
  • 然后下载并配置阿里源
wget -O /etc/yum.repo.d/Centos-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 
//根据centos版本来改版本
  • 清理缓存再重新设置
yum clean all
yum makecache

相关文章

网友评论

      本文标题:修改yum为阿里源

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