CentOS官方已全面停止维护CentOS Linux项目,官方网站公告指出CentOS 7已在2024年6月30日结束了生命周期(end of life)。
官方公告:https://blog.centos.org/2023/04/end-dates-are-coming-for-centos-stream-8-and-centos-linux-7/
由于Linux社区已不再维护CentOS 8/7,会出现无法安装系统更新和安全补丁的问题,建议用户更换到AlmaLinux 9/8,可平替CentOS。如果您的业务过渡期仍需要使用CentOS 8/7,请根据下文更换CentOS的官方镜像源为阿里云镜像源。
查看CentOS版本
cat /etc/centos-release
CentOS 8
删除官方镜像源
rm /etc/yum.repos.d/CentOS-Stream-* -f
更换阿里云镜像源
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
CentOS 7
删除官方镜像源
rm /etc/yum.repos.d/CentOS-Base.repo
更换阿里云镜像源
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
最后执行测试命令,安装wget
yum install wget
对于海外云服务器,使用国内yum源可能会造成下载速度慢,推荐使用下面三条命令更新yum源。
cd /etc/yum.repos.d/
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
感谢您一直以来的支持!我们的旧版系统现已停止使用,请前往新版官网体验更优质的服务。
重要提示:
您的用户名与原系统保持一致。
为了您的账户安全,密码请在新系统点击“忘记密码”在线重置找回。
如有其他疑问,请及时联系在线客服或拨打热线进行协助支持!
立即前往新官网 (56dun.com)