阿里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
  • csy 9个月前

    评论一次