国内我个人觉得阿里的 centos Yum 源比较喜欢 现在整理设置 过程
阿里镜像地址 http://mirrors.aliyun.com
1.安装base reop源
直接更名系统自带 Base 源
sudo mv CentOS-Base.repo CentOS-Base.repo.bak
下载阿里源的文件
Centos7:
wget -O /etc/yum.repo.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
Centos6:
wget -O /etc/yum.repo.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
2 安装epel repo源:
epel(RHEL 7)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
epel(RHEL 6)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
epel(RHEL 5)
wget -O /etc/yum.repos.d/epel.repohttp://mirrors.aliyun.com/repo/epel-5.repo
3.清理缓存
yum clean all
4.重新生成缓存
yum makecache