Upgrade RHEL6 to RHEL7
From Notes_Wiki
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:
- Running preupgrade check via:
- Clear the version lock
- yum versionlock clear
- Enable the Extras repository
- subscription-manager repos --enable rhel-6-server-extras-rpms --enable rhel-6-server-optional-rpms
- Install the Preupgrade Assistant and Red Hat Upgrade Tool
- yum install preupgrade-assistant preupgrade-assistant-el6toel7 redhat-upgrade-tool
- Update all packages to their latest RHEL 6 version
- yum update
- shutdown -r now
- Run the Preupgrade Assistant to perform an assessment of the system
- preupg
- This should generate an HTML file for us to view.
- 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.
- Run the Preupgrade Assistant again. If there are no new problems to be resolved, you can proceed with upgrading your system
- Clear the version lock
- Upgrade
- Install the yum-utils package
- yum install yum-utils redhat-upgrade-tool
- Disable active repositories:
- yum-config-manager --disable \*
- Download latest RHEL 7 ISO
- Visit the Red Hat Customer Service Portal at https://access.redhat.com/login and enter your user name and password to log in.
- Click Downloads to visit the Software & Download Center.
- In the Red Hat Enterprise Linux area, click Download Software to download the latest version of the software.
- Copy the RHEL 7.9 iso to /root directory
- 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
- Reboot the system when prompted
- shutdown -r now
- Install the yum-utils package
- (Optionally) Update your new RHEL 7 packages to their latest version
- yum update
- Verify that the system was upgraded to the desired minor version of RHEL 7
- cat /etc/*release
- (Optionally) Install the gnome desktop
- yum groupinstall 'X Window System' 'GNOME'
- (Optionally) Enable and start the graphical environment
- systemctl set-default graphical.target
- systemctl start graphical.target
Refer: