先查看系统是否有wget这个命令,没有的话需要先安装下:yum -y install wget 下面会用到此命令
进入yum源目录 将以上本地源备份
建立备份存放目录
mkdir yum.bak
将原文文件全部移动至备份目录
mv *o yum.bak
阿里云源地址:http://mirrors.aliyun.com/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
1
epel(RHEL 5)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-5.repo
这里下载的是Centos-7.repo和epel-7
wget -O /etc/yum.repos.d/CentOS-Base-aliyun.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
下载完成后
清除yum缓存:yum clean all
刷新yum缓存yum makecache
标签:epel,repo,mirrors,centos7,yum,aliyun,wget,系统配置 From: https://www.cnblogs.com/ningfuyou/p/16202508.html