CentOS is a Linux distribution that provides a free, community-supported computing platform functionally compatible with its upstream source. Widely used by Small businesses and developers in server environments as it allows stability and reliability that RHEL offers. Being a rolling release and a Beta version for future RHEL releases, CentOS Stream will certainly not be recommended for production workloads.


To migrate from CentOS to Oracle Linux

First, log in to and upgrade CentOS to the latest current release. At the instant, the newest CentOS release is CentOS 8.4.

$ sudo dnf update


Once the upgrade is done, you can check the upgrade via the following command.

$ cat /etc/redhat-release


To switch from your CentOS instance to Oracle Linux, download and run the migration script from Github. It includes a couple of operations:

Removing any CentOS-specific packages 

Replacing them with the Oracle Linux equivalent. 


To download the script, run the curl command as shown.

$ curl -O https://raw.githubusercontent.com/oracle/centos2ol/main/centos2ol.sh


It downloads the migration script called centos2ol.sh as designated.


Next, set the execute permissions via the command chmod.

$ chmod +x centos2ol.sh


To start the migration, run the script as shown.

$ sudo bash centos2ol.sh


As mentioned earlier, the script performs several operations. It first checks if all the required packages needed during the upgrade are present and installs the missing ones.


It then proceeds to back up and obsolete old CentOS repository files.

Next, it enables the Oracle Linux App stream and Base OS repositories and removes the CentOS equivalent ones.

After switching to Oracle Linux repositories, it syncs with the online repositories and upgrades the Oracle Linux packages. It will also reinstall some packages.


The entire process is quite long, and you may want to give yourself at least 2 – 3 hours and perhaps take a walk or go shopping. Once the process is complete, it is recommended to reboot your CentOS system. So run the command:

$ sudo reboot


During the reboot, the Oracle Linux log will be splashed on the screen.


Soon after that, the Grub menu will be displayed. The Oracle Linux Server entry will be first on the list, so hit ENTER on the keyboard to boot into Oracle Linux.


Once you are logged in, once again, verify the OS version as follows.

$ cat /etc/os-release


That’s it. We hope you will enjoy the installation.

In case if you found it difficult, we have admins available to do it on your behalf. You need to hire our experts.

Was this answer helpful? 0 Users Found This Useful (0 Votes)