目录
查看当前的 yum 源
yum repolist
对CentOS-Base.repo进行备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
使用阿里云源替换本地源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
清除yum缓存并更新
yum clean all
yum makecache
安装epel源
yum list | grep epel-release
yum install -y epel-release