CentOS6.x升级Centos7.x

CentOS6.x升级Centos7.x

dev.centos.org is a testing repo. It contains contributed packages that have been built but are still awaiting feedback. Once that package receives enough positive feedback it is moved to one of the main CentOS repos. If not enough feedback is received then it is assumed that no one is interested in the package and it will be removed. So yes, it's really important that users provide feedback on testing packages. 官方已经删除了dev.centos.org这个仓库,已经不能通过这个升级了,都是建议直接重新安装

注1:网上有很多centos6升级到centos7的技术文,但基本会报错,或者升级时采用的源不支持,本文只是做一次整合,绕过错误和不能用于升级的源。

注2:不建议CentOS6.6+系统升级CentOS7,6.6以上的系统很多服务组件比7系统版本更新,可能会造成升级失败

注3:建议使用纯净版系统升级,第三方组件和服务越多,越容易失败

step1:

[root@localhost ~]# cat << EOF >> /etc/yum.repos.d/upgrade.repo
> [upgrade]
> name=upgrade
> baseurl=http://dev.centos.org/centos/6/upg/x86_64/
> enable=1
> gpgcheck=0
> EOF

step2:

[root@localhost ~]# yum install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm -y
注:必须安装openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm这个包,不然肯定会报错
[root@localhost ~]# yum install preupgrade-assistant-contents redhat-upgrade-tool preupgrade-assistant -y

step3:

[root@localhost ~]# preupg -l
CentOS6_7
[root@localhost ~]# preupg -s CentOS6_7
显示如下截图为验证成功,可以升级

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-KwVCnaR8-1606195899385)(http://images.sarehart.com/uodate_7.png)]

step4:

[root@localhost ~]# redhat-upgrade-tool --network 7 --instrepo=http://mirror.nsc.liu.se/centos-store/7.2.1511/os/x86_64/
建议只升级到7.2系统,如想使用最新的7.x系统,可以在升级7.2完成后使用update升级
当出现如下信息时,表示升级成功,重启系统即可
(265/266): zlib-1.2.7-13.el7.x86_64.rpm                                                                       |  89 kB     00:00    
(266/266): zlib-devel-1.2.7-13.el7.x86_64.rpm                                                                 |  49 kB     00:00     
testing upgrade transaction.
rpm transaction 100% [==============================================================================================================]
rpm install 100% [==================================================================================================================]
setting up system for upgrade Finished. Reboot to start upgrade.

注意:如升级的时候显示check字样,表示系统中存在很多第三方组件,可能会造成升级失败,可以使用如下方式升级,但可能会造成系统无法重启,不推荐

[root@localhost ~]# redhat-upgrade-tool --network 7 --instrepo=http://vault.centos.org/7.2.1511/os/x86_64/ --format
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

IA有梦

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

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

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

打赏作者

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

抵扣说明:

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

余额充值