cenos7切换阿里源

Posted 过不去的过去

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cenos7切换阿里源相关的知识,希望对你有一定的参考价值。

  1. 备份并安装base reop源
cd /etc/yum.repos.d
sudo mv CentOS-Base.repo CentOS-Base.repo.bak
  1. 下载阿里源并配置
sudo wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
  1. 安装epel repo源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

4 清理缓存

yum clean all

5 .重新生成缓存

yum makecache




以上是关于cenos7切换阿里源的主要内容,如果未能解决你的问题,请参考以下文章