阿里yum源加速

阿里yum源加速

安装base reop源

  • 旧源备份
cd /etc/yum.repos.d
sudo mv CentOS-Base.repo CentOS-Base.repo.bak
  • 修改为阿里源
sudo wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

安装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.repo http://mirrors.aliyun.com/repo/epel-5.repo

刷新缓存

yum clean all
yum makecache