编辑
2022-06-23
技术
00
请注意,本文编写于 672 天前,最后修改于 515 天前,其中某些信息可能已经过时。

目录

1. 首先备份当前配置文件
2. 下载新的 CentOS-Base.repo 到 /etc/yum.repos.d
CentOS8
CentOS7
3. 运行 yum makecache 生成缓存

1. 首先备份当前配置文件

shell
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2. 下载新的 CentOS-Base.repo 到 /etc/yum.repos.d

CentOS8

shell
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo

CentOS7

shell
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3. 运行 yum makecache 生成缓存

shell
yum makecache

本文作者:TyrantGenesis

本文链接:

版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!