centos7基础yum源替换成阿里yum源并增加扩展EPEL源
一、基础yum源替换成阿里yum源
1、备份原有基础yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
2、下载阿里yum源repo文件
cd /etc/yum.repos.d
wget http://mirrors.aliyun.com/repo/Centos-7.repo
3、阿里yum源repo文件改名为基础yum源文件名
mv Centos-7.repo CentOS-Base.repo
4、重新生成缓存
yum clean all
yum makecache
二、增加扩展EPEL源(弥补找不到软件包的问题)
1、EPEL作用
如果既想获得 RHEL 的高质量、高性能、高可靠性,又需要方便易用(关键是免费)的软件包更新功能,那么 Fedora Project 推出的 EPEL(Extra Packages for Enterprise Linux)正好适合你。EPEL(http://fedoraproject.org/wiki/EPEL) 是由 Fedora 社区打造,为 RHEL 及衍生发行版如 CentOS、Scientific Linux 等提供高质量软件包的项目。
2、EPEL安装
2.1、yum命令直接安装
yum -y install epel-release