8i | 9i | 10g | 11g | 12c | 13c | 18c | 19c | 21c | 23c | Misc | PL/SQL | SQL | RAC | WebLogic | Linux

Home » Articles » Linux » Here

Leapp : Upgrade Oracle Linux 7 (OL7) to Oracle Linux 8 (OL8)

This article demonstrates how to upgrade an Oracle Linux 7 (OL7) installation to Oracle Linux 8 (ol8) using Leapp.

Assumptions

Here are a few assumptions you should consider before launching into this.

Basic Prerequisites

Check out the Leapp documentation for a comprehensive list of prerequisites.

Check the locale is set to "en_US.UTF-8".

cat /etc/locale.conf
LANG="en_US.UTF-8"
#

For KVM hosts, we need to shutdown all running virtual machines.

# List all VMs.
virsh list --all

# Turn off each VM.
virsh shutdown {vm-name}

For systems registered with ULN, we need to unregister the system. This is explained at point 12 here. Our system is using yum.oracle.com, not ULN, so this step is unnecessary.

Make sure the root SSH logins are possible by adding the following entry to the "/etc/ssh/sshd_config" file.

PermitRootLogin yes

Install Leapp

We use the following command to enable required repositories for Leapp, and install the Leapp software.

yum install -y leapp-upgrade --enablerepo=ol7_leapp,ol7_latest

We make sure our installation is totally up to date, and reboot before continuing.

yum update -y

reboot

Preupgrade

We run the preupgrade using the following command.

# On-Prem or other cloud providers
leapp preupgrade --oraclelinux

# OCI
leapp preupgrade --oci

This produces a number of files in the "/var/log/leapp" directory.

cd /var/log/leapp
ls
answerfile  answerfile.userchoices  archive  leapp-preupgrade.log  leapp-report.json  leapp-report.txt
#

The "leapp-report.txt" file contains a list of risk factors that could cause problems during the upgrade. In some cases these may be resolved by a configuration change, or package installations or removals. Make sure all issues are resolved, or you accept the risks associated with them.

In my case I had to perform a single action before I could proceed, and was advised of a step to take after the upgrade completes.

# Before upgrade

# Answer an additional question.
leapp answer --section remove_pam_pkcs11_module_check.confirm=True


# After upgrade
alternatives --set python /usr/bin/python3

Notice we used the Leapp CLI to answer the remaining question. We could have manually edited the "answerfile" to achieve the same result.

Once all inhibitors have been fixed, run the preupgrade again to make sure it completes as expected.

# On-Prem or other cloud providers
leapp preupgrade --oraclelinux

# OCI
leapp preupgrade --oci

Upgrade

Check the current release.

cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.9 (Maipo)
#

cat /etc/oracle-release
Oracle Linux Server release 7.9
#

We are now in a position to run the upgrade, using the following command.

# On-Prem or other cloud providers
leapp upgrade --oraclelinux

# OCI
leapp upgrade --oci

Once the upgrade has completed, reboot the server.

reboot

It's worth watching the console, as some upgrades result in failures that are only visible at the console as the server boots.

Post-Upgrade

Check the current release.

cat /etc/redhat-release
Red Hat Enterprise Linux release 8.6 (Ootpa)
#

cat /etc/oracle-release
Oracle Linux Server release 8.6
#

We can also check the kernel and and default kernel.

uname -r
5.4.17-2136.311.6.el8uek.x86_64
#

sudo grubby --default-kernel
/boot/vmlinuz-5.4.17-2136.311.6.el8uek.x86_64
#

Configure your local firewall using firewalld. Firewalld is described here.

If you are using SELinux, configure it, as described here.

For KVM hosts, we start all virtual machines.

# List all VMs.
virsh list --all

# Turn off each VM.
virsh start {vm-name}

Review the available repositories in the "/etc/yum.repos.d" directory, and remove any OL7 repositories.

Run any post-upgrade commands suggested by the pre-upgrade.

Restore any configuration changes that were necessary to remove inhibitors, for example mount NFS/CIFS shares.

Thoughts

Here are some thoughts about the Leapp upgrades.

For more information see:

Hope this helps. Regards Tim...

Back to the Top.