This step-by-step guide shows how to upgrade and migrate at the same time, from CentOS 7 to Oracle Linux 8. The example leverages Leapp and Elevate open source projects to execute migration and upgrade in one single step.
It’s also important to know that you’re not forced to upgrade to Oracle Linux 8; you also have the option to migrate from CentOS 7 to Oracle Linux 7. Further details on this option are available with the automated script we published on GitHub here.
Step-by-step: guide
- The first step is to get your existing CentOS 7 system updated to latest packages release available and then reboot. To do this, please execute following step:
# sudo yum update -y
# sudo reboot
- Install the “elevate” release RPM to get access to Elevate binaries
# sudo yum install -y http://repo.almalinux.org/elevate/elevate-release-latest-el$(rpm –eval %rhel).noarch.rpm
- Install “leapp” packages and migration data for Oracle Linux, as the target to migrate to
# sudo yum install -y leapp-upgrade leapp-data-oraclelinux
- The preupgrade check can be used anytime to assess the status of a system and identify where conflicts may occur. It does not change the system, but creates report files and a debug log, containing information about the system, its configuration, and potential upgrade issues. Run the leapp preupgrade command to start the preupgrade process
# sudo leapp preupgrade
Note: A leapp-report.txt file and an answerfile are created, and debug information is saved in a leapp-preupgrade.log file. Check those files to address possible upgrade issues; for further details you can check “leapp” documentation for Oracle Linux 8
- Start the upgrade. You’ll be offered to reboot the system after this process is completed.
# sudo leapp upgrade
# sudo reboot
-
After reboot, login to the system and check how the migration went. Verify that the current OS is Oracle Linux 8 to then check packages left from CentOS 7 that could be removed or updated manually; finally, look at the upgrade logs to check the upgrade process correctly completed.
# cat /etc/oracle-release
# cat /etc/os-release
# rpm -qa | grep el7
# cat /var/log/leapp/leapp-report.txt
# cat /var/log/leapp/leapp-upgrade.log
Step-by-step: example and screenshots
- CentOS 7 – System Update
- CentOS 7 – System Reboot
- Install “Elevate” release RPM on CentOS 7
- Install leapp packages and migration data for Oracle Linux
- Execute “leapp” pre-upgrade process
- Check the report to address possible upgrade issues and work on the answerfile reported
- Start the upgrade and migration process (CentOS 7 to Oracle Linux 8)
- Reboot the CentOS 7 system (you can track the upgrade/migration process on the sytem console if desired)
- Console access example
- Verify that the current OS is Oracle Linux 8
- Check possible “CentOS 7” packages that need to be removed and remove them
- Note: to remove all the EL7 packages you also have to comment following row on “/etc/yum.conf” configuration file
- Finally you can check possible logs and report by pointing to “/var/log/leapp/leapp-report.txt” and “/var/log/leapp/leapp-upgrade.log” files.
Migration and upgrade resources
- Oracle Linux: Leapp tutorial to migrate from Oracle Linux 7 to Oracle Linux 8
- Documentation
- Switch from CentOS Linux to Oracle Linux
