因為交易系統部的同事提出了一個新的需求要將現有的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
[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:
The upgrade procedure consists of the following basic steps:
核心目標為格式化/分區,保留其它文件系統,做好相應備份重裝RHEL7
生產環境當前系統版本為RHEL6.7,推薦升級至RHEL7.1或者更新的版本
通過RHEL7.1的ISO引導至INSTALLATION SUMMARY
更多RedHat相關信息見RedHat 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=10