Centos6 源

背景

centos6操作系统版本已经结束了生命周期(EOL),linux社区已经不再维护该操作系统的版本建议升级操作系统至centos7如果生产中业务过度期仍需要使用centos6系统中的一些安装包,请按照下文切换centos6的yum源2020年11月30日CentOS6EOL。按照社区规则CentOS6的源地址http://mirror.centos.org/centos-6/内容已移除目前第三方的镜像站中均已移除CentOS6的源。阿里云的源http://mirrors.cloud.aliyuncs.com和http://mirrors.aliyun.com也无法同步到CentOS6的源。当您在阿里云上继续使用默认配置的CentOS6的源会发生报错。报错示例如下图所示:
在这里插入图片描述

解决办法:

直接在linux命令行执行以下代码即可
cat >> /etc/yum.repos.d/CentOS-aliyun-lhr.repo <<“EOF” [base] name=CentOS-6.10 enabled=1 failovermethod=priority baseurl=http://mirrors.aliyun.com/centos-vault/6.10/os/ b a s e a r c h / g p g c h e c k = 1 g p g k e y = h t t p : / / m i r r o r s . a l i y u n . c o m / c e n t o s − v a u l t / R P M − G P G − K E Y − C e n t O S − 6 [ u p d a t e s ] n a m e = C e n t O S − 6.10 e n a b l e d = 1 f a i l o v e r m e t h o d = p r i o r i t y b a s e u r l = h t t p : / / m i r r o r s . a l i y u n . c o m / c e n t o s − v a u l t / 6.10 / u p d a t e s / basearch/ gpgcheck=1 gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6 [updates] name=CentOS-6.10 enabled=1 failovermethod=priority baseurl=http://mirrors.aliyun.com/centos-vault/6.10/updates/ basearch/gpgcheck=1gpgkey=http://mirrors.aliyun.com/centosvault/RPMGPGKEYCentOS6[updates]name=CentOS6.10enabled=1failovermethod=prioritybaseurl=http://mirrors.aliyun.com/centosvault/6.10/updates/basearch/ gpgcheck=1 gpgkey=http://mirrors.aliyun.comm/centos-vault/RPM-GPG-KEY-CentOS-6 [extras] name=CentOS-6.10 enabled=1 failovermethod=priority baseurl=http://mirrors.aliyun.com/centos-vault/6.10/extras/$basearch/ gpgcheck=1 gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6 [epel] name=Extra Packages for Enterprise Linux 6 - b a s e a r c h e n a b l e d = 1 f a i l o v e r m e t h o d = p r i o r i t y b a s e u r l = h t t p : / / m i r r o r s . a l i y u n . c o m / e p e l − a r c h i v e / 6 / basearch enabled=1 failovermethod=priority baseurl=http://mirrors.aliyun.com/epel-archive/6/ basearchenabled=1failovermethod=prioritybaseurl=http://mirrors.aliyun.com/epelarchive/6/basearch gpgcheck=0 gpgkey=http://mirrors.aliyun.com/epel-archive/RPM-GPG-KEY-EPEL-6 EOF cat >> /etc/yum.repos.d/CentOS-neusoft-lhr.repo <<“EOF” [base] name=CentOS-6-Base baseurl=http://mirrors.neusoft.edu.cn/centos/6/os/ b a s e a r c h / g p g c h e c k = 1 g p g k e y = h t t p : / / m i r r o r . c e n t o s . o r g / c e n t o s / R P M − G P G − K E Y − C e n t O S − 6 [ u p d a t e s ] n a m e = C e n t O S − 6 − U p d a t e s b a s e u r l = h t t p : / / m i r r o r s . n e u s o f t . e d u . c n / c e n t o s / 6 / u p d a t e s / basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 [updates] name=CentOS-6-Updates baseurl=http://mirrors.neusoft.edu.cn/centos/6/updates/ basearch/gpgcheck=1gpgkey=http://mirror.centos.org/centos/RPMGPGKEYCentOS6[updates]name=CentOS6Updatesbaseurl=http://mirrors.neusoft.edu.cn/centos/6/updates/basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 [extras] name=CentOS-6-Extras baseurl=http://mirrors.neusoft.edu.cn/centos/6/extras/ b a s e a r c h / g p g c h e c k = 1 g p g k e y = h t t p : / / m i r r o r . c e n t o s . o r g / c e n t o s / R P M − G P G − K E Y − C e n t O S − 6 [ c e n t o s p l u s ] n a m e = C e n t O S − 6 − P l u s b a s e u r l = h t t p : / / m i r r o r s . n e u s o f t . e d u . c n / c e n t o s / 6 / c e n t o s p l u s / basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 [centosplus] name=CentOS-6-Plus baseurl=http://mirrors.neusoft.edu.cn/centos/6/centosplus/ basearch/gpgcheck=1gpgkey=http://mirror.centos.org/centos/RPMGPGKEYCentOS6[centosplus]name=CentOS6Plusbaseurl=http://mirrors.neusoft.edu.cn/centos/6/centosplus/basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 [contrib] name=CentOS-6-Contrib baseurl=http://mirrors.neusoft.edu.cn/centos/6/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 [epel] name=Extra Packages for Enterprise Linux 6 - b a s e a r c h e n a b l e d = 1 f a i l o v e r m e t h o d = p r i o r i t y b a s e u r l = h t t p : / / m i r r o r s . n e u s o f t . e d u . c n / e p e l / 6 / basearch enabled=1 failovermethod=priority baseurl=http://mirrors.neusoft.edu.cn/epel/6/ basearchenabled=1failovermethod=prioritybaseurl=http://mirrors.neusoft.edu.cn/epel/6/basearch gpgcheck=0 gpgkey=http://mirrors.neusoft.edu.cn/epel/RPM-GPG-KEY-EPEL-6 EOF
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

文龙的_VLOG.

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值