# 配置aliyun的epel yum源
yum install -y wget
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak ---> 建议先把之前的备份一份
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget https://mirrors.aliyun.com/repo/epel-7.repo
wget http://mirrors.aliyun.com/repo/epel-6.repo
yum clean all
yum makecache
yum repolist
参考文档