admin 发表于 2024-7-19 13:45:12

Centos7停止维护更换yum源教程

1. 备份当前yum 源
在更换 yum 源之前,建议先备份当前的 Yum 源配置文件,以防万一。执行以下命令:
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup这将备份当前的 yum 源配置文件为 CentOS-Base.repo.bak。



2. 下载新的 Yum 源配置文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo这里下载的是阿里云的centos7 yum源。


3. 清除 yum 缓存
yum clean all

4. 生成新的缓存
yum makecache

页: [1]
查看完整版本: Centos7停止维护更换yum源教程