1. 备份yum源
cd /etc/yum.repos.d mkdir repo_bak mv *.repo repo_bak/
2. 下载阿里云repo文件
wget -O /etc/yum.repos.d/CentOS-Base.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
3. 清空yum缓存,并生成新的yum缓存
yum clean all yum makecache
4. 安装软件扩展源
yum install -y epel-release
原文地址:https://www.cnblogs.com/weige007/p/12099141.html
时间: 2024-09-28 14:49:57