CentOS7更换阿里yum源
CentOS7更换阿里yum源
官方镜像下载地址:https://www.centos.org/download/mirrors/
阿里云Linux-CentOS镜像仓库地址:http://mirrors.aliyun.com/centos/
1.备份原有yum源
注意:操作之前先安装wget,否则第二步无法执行wget
yum install -y wget
- cd /etc/yum.repos.d/
- mkdir repo_bak
- mv *.repo repo_bak/
2.下载阿里yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3.清理yum缓存,重建缓存
- yum clean all
- yum makecache
4.安装epel-release
1.查看是否存在
yum list | grep epel-release
2.安装
yum install -y epel-release
3.重置yum缓存
- yum clean all
- yum makecache
5.查看yum源信息
- 查看已启用 yum repolist enabled
- 查看所有 yum repolist all
标签:epel,repo,缓存,CentOS7,阿里,yum From: https://www.cnblogs.com/chuangsi/p/17401583.html