VPS/云主机等
优惠信息分享

CentOS8停止更新更换镜像源的方法记录

CentOS8已经停止更新一年多,如果我们还在用这个镜像的话建议还是更新到其他源。这里我们可以从这几个方法更换源。当然前提是备份好数据。

1、公网用户

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
yum clean all && yum makecache

2、阿里云用户

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.aliyuncs.com/repo/Centos-vault-8.5.2111.repo
sed -i 's/mirrors.cloud.aliyuncs.com/url_tmp/g' /etc/yum.repos.d/CentOS-Base.repo && sed -i 's/mirrors.aliyun.com/mirrors.cloud.aliyuncs.com/g' /etc/yum.repos.d/CentOS-Base.repo && sed -i 's/url_tmp/mirrors.aliyun.com/g' /etc/yum.repos.d/CentOS-Base.repo
yum clean all && yum makecache

当然,如果我们可以更新到Debian或者Ubuntu也是可以的。

赞(0)
未经允许不得转载:遗弃你|YIQINI.COM » CentOS8停止更新更换镜像源的方法记录

评论 抢沙发

评论前必须登录!

 

登录

找回密码

注册