$ sudo rm -Rf \/root\/tmp_leapp_py3<\/code><\/p>\n\n\n\nIf you are starting from RHEL 8, skip this step.<\/p>\n\n\n\n
Step 4: Confirm BaseOS and AppStream Repositories Are Enabled<\/h2>\n\n\n\n Next, ensure the BaseOS and AppStream repositories are enabled as follows.<\/p>\n\n\n\n
$ sudo subscription-manager repos –enable rhel-8-for-x86_64-baseos-rpms –enable rhel-8-forx86_64-appstream-rpms<\/code><\/p>\n\n\n\n <\/figure>\n\n\n\nIf you are upgrading using Red Hat Update Infrastructure (RHUI) on AWS, then enable the required RHUI repositories.<\/p>\n\n\n\n
$ sudo dnf config-manager \u2013set-enabled rhui-client-config-server-8<\/code><\/p>\n\n\n\nNext, install the required RHUI packages to ensure your system is ready for the upgrade.<\/p>\n\n\n\n
$ sudo dnf -y install rh-amazon-rhui-client-ha leapp-rhui-aws<\/code><\/p>\n\n\n\nStep 5: Lock the System to RHEL 8.6<\/h2>\n\n\n\n Next, lock your RHEL system to RHEL 8.6. This marks the version of RHEL from which the upgrade will start.<\/p>\n\n\n\n
$ sudo subscription-manager release –set 8.6<\/code><\/p>\n\n\n\n <\/figure>\n\n\n\nStep 6: Update Packages to the Latest Versions<\/h2>\n\n\n\n In the next step, update all packages to the latest versions.<\/p>\n\n\n\n
$ sudo dnf update<\/code><\/p>\n\n\n\n <\/figure>\n\n\n\nThen reboot your system.<\/p>\n\n\n\n
$ sudo reboot<\/code><\/p>\n\n\n\nStep 7: Install the Leapp Utility Tool<\/h2>\n\n\n\n The Leapp utility is a command-line tool that allows users to make an in-place upgrade. Under the hood, the Leapp utility does the following:<\/p>\n\n\n\n
\nPrepares the process before the first reboot<\/li>\n\n\n\n Executes the upgrade process in the RAM disk<\/li>\n\n\n\n Runs minor post-upgrade tasks after the upgrade from the RAM disk<\/li>\n<\/ul>\n\n\n\nTo install the Leapp utility, run the command:<\/p>\n\n\n\n
$ sudo dnf install leapp-upgrade -y<\/code><\/p>\n\n\n\n <\/figure>\n\n\n\nStep 8: Remove the Versionlock Plugin<\/h2>\n\n\n\n The Versionlock plugin is a plugin that holds back packages from being upgraded to newer versions. If you are using the plugin to lock packages to a specific version, clear the lock as shown.<\/p>\n\n\n\n
$ sudo dnf versionlock clear<\/code><\/p>\n\n\n\nStep 9: Edit the Firewalld Configuration<\/h2>\n\n\n\n For a seamless upgrade to RHEL 9, you need to disable the AllowZoneDrifting<\/code> value in the Firewalld configuration. If your firewall configuration needs it, be sure to edit the value back to the default after you complete your system upgrade. <\/p>\n\n\n\nTo edit the Firewalld configuration, first switch to the root user.<\/p>\n\n\n\n
$ sudo su<\/code><\/p>\n\n\n\nThen access the configuration file.<\/p>\n\n\n\n
# vim \/etc\/firewalld\/firewalld.conf<\/code><\/p>\n\n\n\nLocate and \u201cinsert a comment\u201d at the AllowZoneDrifting <\/code>attribute; save and quit vim.<\/p>\n\n\n\n <\/figure>\n\n\n\nSave and restart Firewalld for the changes to apply.<\/p>\n\n\n\n
# systemctl restart firewalld<\/code><\/p>\n\n\n\nStep 10: Perform a Pre-Upgrade and Resolve Any Issues<\/h2>\n\n\n\n Before upgrading to RHEL 9, it\u2019s a good idea to evaluate the upgradability of your system by executing a pre-upgrade process using the leapp preupgrade<\/code> command.<\/p>\n\n\n\nDuring the pre-upgrade process, the Leapp utility collects data about your system, verifies the upgradability, and generates a pre-upgrade report that\u2019s saved in the \/var\/log\/leapp\/leapp-report.txt<\/code> text file. <\/p>\n\n\n\nThe report contains a summary of all the potential issues that might hinder the upgrade and proposes recommended workarounds. It also determines whether or not you can continue with the upgrade, and will not allow the upgrade to run until those issues are fixed.<\/p>\n\n\n\n
To begin the pre-upgrade process, run the command:<\/p>\n\n\n\n
$ sudo leapp preupgrade –target 9.0<\/code><\/p>\n\n\n\n <\/figure>\n\n\n\nIt is totally normal to run into some errors when performing the pre-upgrade process. In our case, we ran into two errors indicating the presence of invalid files. To resolve an error, click on the link provided as a hint.<\/p>\n\n\n\n <\/figure>\n\n\n\nOnce you have successfully addressed the specific errors identified for your system, re-run the pre-upgrade operation. This time around, you should receive an error-free report that will allow you to proceed with the in-place upgrade to RHEL 9.<\/p>\n\n\n\n <\/figure>\n\n\n\nStep 11: Upgrade RHEL 8 to RHEL 9<\/h2>\n\n\n\n Finally, perform the upgrade to RHEL 9 by running the in-place upgrade command.<\/p>\n\n\n\n
$ sudo leapp upgrade –target 9.0<\/code><\/p>\n\n\n\n <\/figure>\n\n\n\nThe upgrade takes quite a while, so this is a good time to take a break from your desk. When the upgrade completes, you will be prompted to restart your system. Go ahead and reboot.<\/p>\n\n\n\n
$ sudo reboot<\/code><\/p>\n\n\n\n <\/figure>\n\n\n\nOn the GRUB menu select the RHEL-Upgrade-Initramfs option.<\/p>\n\n\n\n <\/figure>\n\n\n\nOnce selected, the upgrade to RHEL 9 will continue and some packages will be upgraded while others will be obsoleted.<\/p>\n\n\n\n <\/figure>\n\n\n\nThe system will then restart, and this time around, select the first GRUB entry as shown.<\/p>\n\n\n\n <\/figure>\n\n\n\nOn the login screen, provide your user\u2019s password and select ENTER to log in.<\/p>\n\n\n\n <\/figure>\n\n\n\nSince the system is still locked to RHEL 8.6, you need to set it again to version 9.0. To do so, run the command:<\/p>\n\n\n\n
$ sudo subscription-manager release –set=9.0<\/code><\/p>\n\n\n\nTo confirm the system has been set to 9.0 release, run the command:<\/p>\n\n\n\n
$ sudo subscription-manager release –show<\/code><\/p>\n\n\n\n <\/figure>\n\n\n\nIn addition, you can confirm the version of RHEL you are running as follows.<\/p>\n\n\n\n
$ cat \/etc\/redhat-release<\/code><\/p>\n\n\n\n <\/figure>\n\n\n\nConclusion<\/h2>\n\n\n\n And there you have it. We have demonstrated step-by-step how to perform an in-place upgrade of RHEL 8 to RHEL 9.<\/p>\n\n\n\n
Although keeping your system up to date is the first step in mitigating potential security risks, it should not be the last. This holds especially true if you\u2019re an IT admin managing multiple Linux systems. Linux malware is increasing in volume and complexity<\/a> and most small to medium-size enterprises (SMEs) aren\u2019t ready for it. <\/p>\n\n\n\nRead more about the importance of standardizing security configurations across your fleet and how to simplify Linux device hardening<\/a>.\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"Learn how to perform an in-place upgrade from RHEL 8 to RHEL 9 to take advantage of improvements in performance, availability, and security.<\/p>\n","protected":false},"author":150,"featured_media":69273,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_oasis_is_in_workflow":0,"_oasis_original":0,"_oasis_task_priority":"","inline_featured_image":false,"footnotes":""},"categories":[2781],"tags":[],"collection":[2778],"platform":[],"funnel_stage":[3017],"coauthors":[2535],"acf":[],"yoast_head":"\n
How to Upgrade From RHEL 8 to RHEL 9 - JumpCloud<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n \n \n \n\t \n\t \n\t \n