首页 > 代码库 > 配置alibaba的yum 源

配置alibaba的yum 源

1, 进入yum源目录

 cd /etc/yum.repos.d

2, 备份系统yum配置文件

sudo mv CentOS-Base.repo CentOS-Base.repo.bak

3, 下载ali 文件

sudo wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

4, 安装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

5, 清理缓存

yum clean all

6, 重建缓存

yum makecache

 

配置alibaba的yum 源