CentOS7将yum源更改为阿里的镜像源,EPEL

将Yum源更改为阿里的镜像源

  1. 备份原有yum源文件,以便日后恢复原有yum源

  mkdir repo
  mv *.repo repo/

  2.下载阿里的yum源文件(可更改最后数字以改版yum源版本)

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

  3.清除缓存并生成新缓存

  yum clean all
  yum makecache

安装EPEL

yum install -y epel-release
原文地址:https://www.cnblogs.com/xiaoerjun/p/10601485.html