- 备份并安装base reop源
cd /etc/yum.repos.d
sudo mv CentOS-Base.repo CentOS-Base.repo.bak
- 下载阿里源并配置
sudo wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
- 安装epel repo源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
4 清理缓存
yum clean all
5 .重新生成缓存
yum makecache
原文地址:https://www.cnblogs.com/liaoxianfu/p/287557077f4f37348829c9b101e77dcc.html
时间: 2024-10-09 02:49:55