感谢支持
我们一直在努力

Red Hat Enterprise Linux 6 升级 Red Hat Enterprise Linux 7 经验分享

前言

因为交易系统部的同事提出了一个新的需求要将现有的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 主版本之间的升级吗?

Environment

  • Red Hat Enterprise Linux 4
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7

Issue

  • 如何从红帽企业版 Linux 的一个版本升级到另一个版本?
  • 可以从 RHEL 的不同主版本之间移植吗?
  • 红帽支持 RHEL 主版本之间的升级吗(比如从5升级到6)?
  • 可以在 RHEL 5 上安装 RHEL 6 吗?
  • 安装介质没有包含升级选项;
  • 如何从 RHEL 5 升级到 RHEL 6

Resolution

Red Hat Enterprise Linux 4, 5, 6

红帽 不支持 RHEL 主版本之间的跨大版本升级。(主版本以整数表示。比如,RHEL 5 和 RHEL 6 都是不同的主版本。)

不同主版本之间的跨大版本升级,不会保留所有系统设置、服务配置和自定义设置。因此, 红帽强烈建议重新安装系统,以进行主版本之间的升级 。建议在运行着的服务器旁,使用新的服务器安装一个全新的RHEL,然后把原有的设 置、软件和数据迁移到新服务器上,以确保系统和软件能在新服务器上正确运行。 这还有助于确保数据安全地从备份转移到新的系统。

还有方法可以不进行全新安装,来进行升级。要实现这个功能,插入新版本的安装光盘,然后在 boot 命令行中输入:

 

# linux upgradeany

这将引导您进行与 普通的安装过程很相近的升级步骤。再次说明,这个过程红帽是不予支持的。进行完这个升级操作后,如果您联系红帽技术支持,红帽只会当作全新的安装来提供支持。升级过程中产生的问题是不予支持的。任何时候出现的问题如果疑似与升级过程有关,红帽将要求您重新安装系统。

Comment

  • 红帽建议,系统升级之前要先全面备份数据。
  • 如果之前安装有第三方软件,建议在新系统上重新安装。
  • 更换新版本系统后,个别软件包的配置文件可能会失效,因为新版本配置文件的格式和排列可能会有所变化。
  • 如果之前安装有红帽的 layered products (比如 Cluster Suite), 需要在新系统完全安装之后,手动升级它们。
  • 用升级选项进行升级,系统可能会出现不稳定的情况。
  • 如果出现意外情况,红帽全球支持只能建议您按照建议的方式,重新安装系统并进行迁移。

可参考文档, 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 。更多信息,请参考以下文档:

  • How do I upgrade from RHEL 6 to RHEL 7?
  • What are the supported use cases for upgrading from RHEL 6 to RHEL 7?
  • How do I subscribe to the RHEL Extras channel/repo?
  • Red Hat Enterprise Linux 7 Installation Guide

如有问题,请联系红帽全球支持服务 file a support case ,或在 Discussions area of the Customer Portal 中进行讨论。

How do I upgrade from RHEL 6 to RHEL 7

Environment

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

Issue

  • 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?

Resolution

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:

  1. Prepare for Upgrade: Make sure your system is backed up and up to date before beginning the preupgrade.
  2. Install the Preupgrade Assistant: Enable the required repositories and install the preupgrade packages.
  3. Run the Preupgrade Assistant: Check your system for upgrade issues before running the actual upgrade. No changes are made to your system and you can repeat this step until all issues are dealt with.
  4. Run the Upgrade: Perform the actual upgrade.
  5. Provide Feedback: Create a debug log to send to Red Hat in case there are problems.

实践步骤

核心目标为格式化/分区,保留其它文件系统,做好相应备份重装RHEL7

生产环境当前系统版本为RHEL6.7,推荐升级至RHEL7.1或者更新的版本

通过RHEL7.1的ISO引导至INSTALLATION SUMMARY

  • DATE & TIME设置为Asia/Shanghai timezone
  • LANGUAGE SUPPORT添加English(United States),简体中文(中国)
  • SOFTWARE SELECTION设置为Server with GUI
  • UBSTAKKATUIB DESTINATION分区选择I will configure partioning,点击DONE
  • 找到现有系统中的/分区,选中后在右侧勾选Reformat,Mount Point设置为/,SYSTEM其它分区SWAP,/boot,/usr,/tmp,/var参照同样操作,DATA数据分区不动,点击DONE
  • Begin Install
  • 安装结束后恢复备份数据
  • 恢复原有网卡配置项和IP地址
  • 恢复主机名/Hosts/Profile
  • 恢复fstab分区检查数据一致性

更多RedHat相关信息见RedHat 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=10

本文永久更新链接地址:http://www.linuxidc.com/Linux/2016-10/136145.htm

赞(0) 打赏
转载请注明出处:服务器评测 » Red Hat Enterprise Linux 6 升级 Red Hat Enterprise Linux 7 经验分享
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏