1. 装置 wget
type wget# 如果找不到wget命令,须要先装置yum -y install wget
2. 备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
3. 下载
# CentOS 7wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo# CentOS 8wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo
4. 生成缓存
# 革除缓存yum clean all# 生成缓存,建设元数据yum makecache
参考:https://developer.aliyun.com/...