Upgrade RHEL6 to RHEL7

From Notes_Wiki
Revision as of 03:24, 12 September 2022 by Saurabh (talk | contribs)

Home > RHEL > Upgrade RHEL6 to RHEL7

For upgrading we need to first run pre-upgrade check. After that we can upgrade using redhat-upgrade-tool. Overall upgrade from RHEL 6 to RHEL 7 can be done as follows:

  1. Running preupgrade check via:
    1. Clear the version lock
      yum versionlock clear
    2. Enable the Extras repository
      subscription-manager repos --enable rhel-6-server-extras-rpms --enable rhel-6-server-optional-rpms
    3. Install the Preupgrade Assistant and Red Hat Upgrade Tool
      yum install preupgrade-assistant preupgrade-assistant-el6toel7 redhat-upgrade-tool
    4. Update all packages to their latest RHEL 6 version
      yum update
      shutdown -r now
    5. Run the Preupgrade Assistant to perform an assessment of the system
      preupg
      This should generate an HTML file for us to view.
      There are options for preupg such as --cleanup for cleaning up after previos run; -S or --skip-common to skip common tests and -d for debug. Apart from HTML it also generate a log file which mostly has same information as what is displayed on screen.
    6. Resolve problems found by the Preupgrade Assistant during the assessment by following the Remediation text in the report. ##: Sometimes for KDE and Gnome the text will include list of packages that need to be removed. We should remove them using yum for preupg test to succeed.
    7. Run the Preupgrade Assistant again. If there are no new problems to be resolved, you can proceed with upgrading your system
  2. Upgrade
    1. Install the yum-utils package
      yum install yum-utils redhat-upgrade-tool
    2. Disable active repositories:
      yum-config-manager --disable \*
    3. Download latest RHEL 7 ISO
      1. Visit the Red Hat Customer Service Portal at https://access.redhat.com/login and enter your user name and password to log in.
      2. Click Downloads to visit the Software & Download Center.
      3. In the Red Hat Enterprise Linux area, click Download Software to download the latest version of the software.
      4. Copy the RHEL 7.9 iso to /root directory
    4. Start the upgrade
      redhat-upgrade-tool --iso iso_path --cleanup-post
      For example
      redhat-upgrade-tool --iso /root/rhel-server-7.9-x86_64-dvd.iso --cleanup-post
    5. Reboot the system when prompted
      shutdown -r now
  3. (Optionally) Update your new RHEL 7 packages to their latest version
    yum update
  4. Verify that the system was upgraded to the desired minor version of RHEL 7
    cat /etc/*release
  5. (Optionally) Install the gnome desktop
    yum groupinstall 'X Window System' 'GNOME'
  6. (Optionally) Enable and start the graphical environment
    systemctl set-default graphical.target
    systemctl start graphical.target

Refer:


Home > RHEL > Upgrade RHEL6 to RHEL7