1 备份好默认的yum仓库文件到/etc/yum.repos.d/bak_repo中
[root@server ~]#cd /etc/yum.repos.d/
[root@server yum.repos.d]#mkdir bak_repo
[root@server yum.repos.d]#mv *.repo bak_repo/
2 配置并生成新的阿里云yum源缓存
# 1. 配置Base源
[root@server yum.repos.d]#wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
# 2. 配置Epel源 :下载第三方工具
[root@server yum.repos.d]#wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
# 3. 清空源缓存 && 生成阿里云缓存
[root@server ~]#yum clean all
[root@server ~]#yum makecache
标签:repos,配置,server,repo,etc,阿里,yum,root
From: https://www.cnblogs.com/btcm409181423/p/17977230