lonesomer 2016-10-17
因为交易系统部的同事提出了一个新的需求要将现有的RHEL6.7升级至RHEL7.1(最好保留数据升级),之前对于小版本的升级无论是CentOS还是RedHat都可以直接通过yum update的方式实现软件包和内核的迭代更新,但是这次的需求经过Redhat知识库的研究发现这几乎是一个不可能轻松实现的任务,原因就是Redhat压根不支持大版本之间的升级,考虑到跨版本兼容性问题和原厂不做技术支持这两点,通过和Redhat二线电话沟通也确认了最终的实现方案,就是先备份相关重要配置和数据格式化/分区保留其它文件系统,重装后在把数据迁移回来。整个过程虽然提不上什么惊心动魄,但至少翻阅了大量材料,官方虽然给出了跨版本升级的步骤,但实现的代价和要求真的太高,这里一并分享出来方便大家学习和思考。
How do I upgrade from RHEL 6 to RHEL 7? Reinstall
扩展阅读
红帽支持 RHEL 主版本之间的升级吗?- https://access.redhat.com/zh_...
How do I upgrade from RHEL 6 to RHEL 7? - https://access.redhat.com/sol...
RHEL 5
升级到 RHEL 6
?Red Hat Enterprise Linux 4, 5, 6
红帽 不支持 RHEL 主版本之间的跨大版本升级。(主版本以整数表示。比如,RHEL 5 和 RHEL 6 都是不同的主版本。)
不同主版本之间的跨大版本升级,不会保留所有系统设置、服务配置和自定义设置。因此, 红帽强烈建议重新安装系统,以进行主版本之间的升级 。建议在运行着的服务器旁,使用新的服务器安装一个全新的RHEL,然后把原有的设 置、软件和数据迁移到新服务器上,以确保系统和软件能在新服务器上正确运行。 这还有助于确保数据安全地从备份转移到新的系统。
还有方法可以不进行全新安装,来进行升级。要实现这个功能,插入新版本的安装光盘,然后在 boot 命令行中输入:
# linux upgradeany
这将引导您进行与 普通的安装过程很相近的升级步骤。再次说明,这个过程红帽是不予支持的。进行完这个升级操作后,如果您联系红帽技术支持,红帽只会当作全新的安装来提供支持。升级过程中产生的问题是不予支持的。任何时候出现的问题如果疑似与升级过程有关,红帽将要求您重新安装系统。
可参考文档, Red Hat Enterprise Linux 6 Installation Guide, Chapter 37. Upgrading Your Current System
升级或重新安装系统后,请重新注册系统,请参考 Red Hat Enterprise Linux 6 Installation Guide, Chapter 37. Upgrading Your Current System
Red Hat Enterprise Linux 7
对于特定的使用情况,红帽支持从 Red Hat Enterprise Linux 6
升级到 Red Hat Enterprise Linux 7
。更多信息,请参考以下文档:
如有问题,请联系红帽全球支持服务 file a support case ,或在 Discussions area of the Customer Portal 中进行讨论。
Red Hat Enterprise Linux 6.x to Red Hat Enterprise Linux 7
Product Variant | x86 Architecture | x86_64 Architecture | IBM Power | IBM z Systems |
---|---|---|---|---|
Desktop Edition | Not supported | Not supported | N/A | N/A |
Workstation Edition | Not supported | Not supported | N/A | N/A |
Server Edition | Not supported | <font color=blue>Supported</font> | <font color=blue>Supported[1]</font> | <font color=blue>Supported[2]</font> |
HPC Compute Node | Not supported | <font color=blue>Supported</font> | N/A | N/A |
Server running CloudForms software | N/A | Not supported | N/A | N/A |
[1] Red Hat Enterprise Linux for Power, big endian
[2] Red Hat Enterprise Linux for IBM z Systems
How do I do in-place upgrading from the latest Red Hat Enterprise Linux 6 to the latest Red Hat Enterprise Linux 7?
How do I use the preupgrade assistant and redhat-upgrade-tool to run a RHEL6 to RHEL7 upgrade?
Red Hat Enterprise Linux 7 (RHEL 7) is the first major release of RHEL to allow in-place upgrades from the previous RHEL major release (RHEL 6). An in-place upgrade offers a way of upgrading a system to a new major release of Red Hat Enterprise Linux by replacing the existing operating system.
This RHEL 6 to RHEL 7 upgrade procedure is fully supported if your Red Hat Enterprise Linux system meets the following criteria:
Latest Red Hat Enterprise Linux 6: Before upgrading to the latest RHEL 7, you must start with RHEL 6 and update your system to have the latest RHEL 6 packages installed. (This is covered in the procedure below.)
All Server editions (except x86): All server editions (except x86) of Red Hat Enterprise Linux 6 can be upgraded with this procedure. Upgrades of RHEL Workstation and Desktop systems are not supported. Upgrades for the POWER architecture is supported. SEE TABLE ABOVE. Upgrade from 32-bit architecture is not supported.
Limited package groups: The upgrade process handles only the following package groups and packages: Minimal (@minimal), Base (@base), Web Server (@web-server), DHCP Server, File Server (@nfs-server), and Print Server (@print-server). Although upgrades of other packages and groups are not supported, in some cases, packages can be uninstalled from the RHEL 6 system and reinstalled on the upgraded RHEL 7 system without a problem. SEE TABLE BELOW.
The supported use cases for upgrading RHEL 6 to RHEL 7:
Supported | Unsupported | |
---|---|---|
Source to Upgrade | The latest RHEL-6.X | RHEL 6.4 and earlier |
File Systems | Like-file system upgrades For example ext3 to ext3, ext4 to ext4, xfs to xfs | Unlike-file system upgrades For example ext4 to xfs |
GNOME, KDE | None | All GNOME, KDE installs |
Packages/Groups | Minimal (@minimal) Base (@base) Web Server (@web-server) DHCP Server File Server (@nfs-server) Print Server | All others |
Virtualization | KVM, VMWare | Microsoft Hyper-V (coming soon) |
Red Hat Software Collections | Using tested process | All others |
High Availability | None | All |
The upgrade procedure consists of the following basic steps:
核心目标为格式化/分区,保留其它文件系统,做好相应备份重装RHEL7
生产环境当前系统版本为RHEL6.7,推荐升级至RHEL7.1或者更新的版本
通过RHEL7.1的ISO引导至INSTALLATION SUMMARY