咨询热线:4006-75-4006
售前:9:00-23:30 备案:9:00-18:00 技术:7*24h
CentOS 8 更换yum源
首先备份原来的yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
接着下载yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo https://www.landui.com/repo/Centos-8.repo
然后清除缓存
yum clean all && yum makecache
哦吼,这时会发现有报错,换源失败
下面是亲测centos8换源成功方法
首先备份下原来的文件
rename '.repo' '.repo.bak' /etc/yum.repos.d/*.repo
然后下载yum源
wget https://www.landui.com/repo/Centos-vault-8.5.2111.repo -O /etc/yum.repos.d/Centos-vault-8.5.2111.repo
wget https://www.landui.com/repo/epel-archive-8.repo -O /etc/yum.repos.d/epel-archive-8.repo
最后清除更新缓存
yum clean all && yum makecache
测试OK换源成功!