A previous Oracle Linux blog discussed using Leapp to upgrade from Oracle Linux 7 to Oracle Linux 8. The Leapp utility is used to simplify an in-place upgrade to a major Oracle Linux release. This blog will demonstrate using Leapp to upgrade an Oracle Linux 8 web server to Oracle Linux 9.
For this demonstration, an Oracle Linux 8 system was built with a "Basic Web Server" profile. An Oracle Linux user 'demo
' was created and configured with sudo
rights and was granted root SSH permissions in the /etc/ssh/sshd_config
file. The Apache web daemon was enabled and configured to support CGI scripts. A small CGI script was copied to the system to produce a web page that includes the hostname, kernel version, Linux distribution version, disk and memory usage.
You can find the details for this preparation in Chapter 2 of the Oracle Linux 9 Performing System Upgrades With Leapp. Here is an overview:
Leapp requires that the system to be upgraded be completely up-to-date with the latest patches.
Update the Oracle Linux 8 machine to the latest patches available:
sudo dnf update
Reboot the system to make all the updates live:
sudo reboot
Log in as the 'demo' user and install the Leapp utility:
sudo dnf install leapp-upgrade --enablerepo=ol8_leapp,ol8_appstream,ol8_baseos_latest
Notice there are no spaces within the parameters passed to the --enablerepo command line switch.
Use a web browser to access the web page. Here is a screenshot before the Leapp upgrade, showing it is running on Oracle Linux 8:
You can find the details in Chapter 3 of the Oracle Linux 9 Performing System Upgrades with Leapp.
Run the preupgrade command.
sudo leapp preupgrade --oraclelinux
On the demo system, the preupgrade process took about 2 minutes to complete. This time is dependent on a number of variables including the number of packages installed, CPU speed, storage speed, etc.
Please read this section in the Oracle Linux 9 Performing System Upgrades with Leapp.
It is very important to understand any high-risk inhibitors. Once you clear some of your high-risk issues you can always run the preupgrade process again. Continue to clear issues and running preupgrade until you have no inhibitors or high-risk issues.
Please read this section in the Oracle Linux 9 Performing System Upgrades with Leapp.
Run the upgrade command.
sudo leapp upgrade --oraclelinux
You will see a LOT of information as the upgrade continues. Some of the messages might say completed, but those are just completions of a particular step! This might be a good time to take a break while the upgrade progresses. On the demo system, here are the three major "stages" of the Leapp process and the approximate time for each to complete:
Upon completion, the upgrade process generates the same files as the preupgrade phase: a process log, a report, and the /var/log/leapp/answerfile.
Examine the /var/log/leapp/leapp-report.txt and fulfill any important recommendations to be completed after the upgrade process.
Refresh the browser pointing at the static CGI web page—and here are the results. The Apache web server was still "alive" and well. The CGI script was still working—and it shows it is now running on Oracle Linux 9!
Make sure to thoroughly review the Leapp documentation before using it to perform any Oracle Linux updates. Also remember it is highly recommended that you have an up-to-date and tested backup of a production server before attempting to upgrade the OS using Leapp.
Our Leapp documentation for Oracle Linux 8 and Oracle Linux 9 will continue to be updated as Leapp continues to be qualified and improved, so check these links often.
For the latest information on Oracle Linux, including Oracle Linux Support, visit https://www.oracle.com/linux/.
Next Post