参考文章:Linux yum更换国内源 - mrma1989 - 博客园
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo_bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
yum clean all
yum makecache
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache
yum -y install epel-release
yum clean all
yum makecache
这三个源基本满足所有开发需求所需要的yum源,有意深入了解linux系统,想搞分布式服务器的同学建议使用编译安装,了解每个依赖库的作用,编译安装可以看我的其它教程