网易官方源
centos6.x
- cd /etc/yum.repos.d/
- mv CentOS-Base.repo CentOS-Base.repo.$(date +%F)
- wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
- yum clean all
- yum makecache
eple 源
yum -y install epel-release
网易官方源
centos7.x
- cd /etc/yum.repos.d/
- mv CentOS-Base.repo CentOS-Base.repo.$(date +%F)
- wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
- yum clean all
- yum makecache
RHEL 官方扩展源
yum -y install http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
阿里官方 yum 源
CentOS 6.x
- cd /etc/yum.repos.d/
- mv CentOS-Base.repo CentOS-Base.repo.$(date +%F)
- wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
- yum clean all
- yum makecache
阿里官方 yum 源
CentOS 7.x
- cd /etc/yum.repos.d/
- mv CentOS-Base.repo CentOS-Base.repo.$(date +%F)
- wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
- yum clean all
- yum makecache
来源: http://www.bubuko.com/infodetail-2566271.html