首页 > 系统相关 >CentOS 更新yum源

CentOS 更新yum源

时间:2022-10-31 10:33:38浏览次数:40  
标签:CentOS repos 更新 repo etc Base yum

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
centos6(centos6官方源已下线,建议切换centos-vault源)
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-6.10.repo
** CentOS 7**
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

3. 运行 yum makecache 生成缓存

标签:CentOS,repos,更新,repo,etc,Base,yum
From: https://www.cnblogs.com/boboooo/p/16843444.html

相关文章