修改为阿里的yum源

如果没有wget,先安装一个。(如果有请蹦过)

yum install wget -y

备份本地yum源

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

获取阿里yum源配置文件

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

 安装epel源

yum install epel-release
原文地址:https://www.cnblogs.com/dongqiliang/p/11921930.html