CentOS系统换源配置方法 2025-01-23 linux 暂无评论 189 次阅读 1.备份 ``` 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(centos8官方源已下线,建议切换centos-vault源) ``` wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo ``` 或者 ``` curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo ``` CentOS 7 ``` wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo ``` 或者 ``` curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo ``` centos6(centos6官方源已下线,建议切换centos-vault源) ``` wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-6.10.repo ``` 或者 ``` curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-6.10.repo ``` 3.生成缓存 ``` yum makecache ``` 原文链接:https://blog.csdn.net/2402_83660241/article/details/144592472 标签: centos 本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。