歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Red Hat Enterprise Linux 6 升級 Red Hat Enterprise Linux 7 經驗分享

Red Hat Enterprise Linux 6 升級 Red Hat Enterprise Linux 7 經驗分享

日期:2017/2/28 13:48:03   编辑:Linux教程

前言

因為交易系統部的同事提出了一個新的需求要將現有的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 Variantx86 Architecturex86_64 ArchitectureIBM PowerIBM 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:

SupportedUnsupported 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

Copyright © Linux教程網 All Rights Reserved