关于linux:CentOS-更换-YUM-镜像源

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 7
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
# CentOS 8
wget -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/…

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理