为你的CentOS安装epel-yum源

1.首先从http://download.fedoraproject.org/pub/epel找到相对应的rpm包

如:https://mirrors.ustc.edu.cn/epel//7/x86_64/e/epel-release-7-9.noarch.rpm

2.下载并安装epel-release-7-9.noarch

#mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup #备份配置文件

#wget https://mirrors.ustc.edu.cn/epel//7/x86_64/e/epel-release-7-9.noarch.rpm

#rpm -ivh epel-release-7-9.noarch

#yum clean all #清除所有缓存

#yum makecache #生成缓存

#yum repolist #查看当前的yum仓库
3.其他镜像站

阿里云
wget http://mirrors.aliyun.com/repo/Centos-7.repo

163
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
 

-------------本文结束感谢您的阅读-------------