In this Linux tutorial, you will learn how to migrate CentOS 8 to Oracle Linux, which is another CentOS alternative from the third largest software company in the world. #centlinux #linux #oracle
Table of Contents
What is Oracle Linux?
Oracle Linux is a Linux distribution based on Red Hat Enterprise Linux (RHEL) and is developed, maintained, and supported by Oracle Corporation. It is designed to be fully compatible with RHEL, making it a suitable alternative for enterprises that require a stable, secure, and high-performance operating system. Oracle Linux is optimized to run Oracle software and hardware, but it is also widely used for general-purpose enterprise computing. (Oracle Linux website)
Key Features of Oracle Linux
RHEL Compatibility:
Oracle Linux is 100% compatible with RHEL, allowing users to run RHEL applications without modification. It uses the same package management system (YUM/DNF) and adheres to the same versioning and release cycle as RHEL.
Unbreakable Enterprise Kernel (UEK):
Oracle Linux offers two kernel options:
- The Unbreakable Enterprise Kernel (UEK), optimized for performance, scalability, and reliability, particularly for Oracle workloads.
- The Red Hat Compatible Kernel (RHCK), which is identical to the RHEL kernel for compatibility purposes.
Enterprise-Grade Support:
Oracle provides robust support services, including patches, updates, and security fixes, making it a reliable choice for mission-critical environments.
Integration with Oracle Products:
Oracle Linux is tightly integrated with Oracle’s ecosystem, including Oracle Database, Oracle Cloud, and other enterprise applications, ensuring optimal performance and ease of management.
Cost-Effective:
Oracle Linux is free to download and use, with optional paid support subscriptions available for enterprises requiring professional assistance.
Security and Stability:
Like RHEL, Oracle Linux emphasizes long-term stability and security, making it suitable for enterprise environments.

Use Cases
- Running Oracle Database and other Oracle software.
- Enterprise workloads requiring RHEL compatibility.
- Cloud environments, particularly Oracle Cloud Infrastructure (OCI).
- High-performance computing and virtualization.
History
Oracle Linux was first released in 2006 as part of Oracle’s strategy to provide a complete stack of enterprise software and hardware solutions. Over the years, it has gained popularity for its performance optimizations and strong support for Oracle products.
In summary, Oracle Linux is a robust, enterprise-grade operating system that combines RHEL compatibility with Oracle-specific enhancements, making it an excellent choice for organizations leveraging Oracle technologies or seeking reliable CentOS alternatives.
Environment Specification
We are using a minimal CentOS 8 virtual machine with following specifications.
- CPU – 3.4 Ghz (2 cores)
- Memory – 2 GB
- Storage – 20 GB
- Operating System – CentOS 8.2
- Hostname – centos-8.centlinux.com
- IP Address – 192.168.116.230 /24
For those looking to closely follow this CentOS 8 to Oracle Linux migration process, it’s highly recommended to set up a home lab environment where you can safely test and experiment without impacting production systems. A compact Mini PC or a reliable VPS from Rose Hosting offers an ideal platform to spin up virtual servers quickly and cost-effectively. These affordable and powerful options provide you with complete control over the Linux environment, making them perfect for practicing migration procedures and honing your sysadmin skills. If you’re interested, consider checking out Mini PCs or Rose Hosting VPS through the affiliate links below to support this blog at no extra cost to you.
[Power Your Projects with the Best Mini PC – Shop Now!]
[Discover the Power of Rose Hosting VPS – Limited Time Offer!]
Disclaimer: Some of the links in this article are affiliate links. This means I may earn a commission if you purchase through these links, at no additional cost to you. Your support helps keep this site running and free of ads.
Checking Current Linux OS
By using a SSH client, connect with centos-8.centlinux.com as root user.
Execute following commands to check the version of your Linux OS.
cat /etc/os-release
cat /etc/centos-releaseOutput:
NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
CentOS Linux release 8.3.2011
Check the version of current Linux Kernel.
uname -rOutput:
4.18.0-240.1.1.el8_3.x86_64
Migrate CentOS 8 to Oracle Linux
Oracle has made the migration process from CentOS Linux to Oracle Linux straightforward and efficient by providing a dedicated bash script called centos2ol.sh on their official GitHub repository. This script is specifically designed to facilitate the seamless transition of systems running CentOS Linux versions 6, 7, and 8 to Oracle Linux. However, it is important to note that the script does not support CentOS Stream, as CentOS Stream follows a different release model and is not directly compatible with the migration process intended for traditional CentOS versions.
To get started with the migration, you can easily download the centos2ol.sh script from Oracle’s GitHub repository using common command-line tools like wget or curl. These tools allow you to fetch the script directly from the repository and save it to your local system. Once downloaded, the script can be executed to automate the migration process, ensuring that your system is properly converted to Oracle Linux with minimal manual intervention. This approach simplifies the migration and reduces the risk of errors, making it an ideal solution for administrators and IT professionals looking to transition from CentOS to Oracle Linux.
wget https://raw.githubusercontent.com/oracle/centos2ol/main/centos2ol.shOutput:
--2021-07-10 19:37:18-- https://raw.githubusercontent.com/oracle/centos2ol/main/centos2ol.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.111.133, 185.199.110.133, 185.199.109.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 21609 (21K) [text/plain]
Saving to: ‘centos2ol.sh’
centos2ol.sh 100%[===================>] 21.10K 8.51KB/s in 2.5s
2021-07-10 19:37:34 (8.51 KB/s) - ‘centos2ol.sh’ saved [21609/21609]
Grant execution permissions on centos2ol.sh to everyone.
chmod +x centos2ol.shAccording to centos2ol.sh documentation, please check and adjust following prerequisites.
- Because of the GRUB2 BootHole vulnerability, our SecureBoot shim can only boot kernels signed by Oracle and we can only replace the default CentOS kernels. While this may not have an impact if SecureBoot is currently disabled, enabling it at a later date could render the system unbootable. For that reason, we strongly recommend removing all non-standard kernels, i.e. any kernel that is installed that is not provided by either the base or updates repo. This includes the centosplus kernels.
- Ensure your CentOS yum or dnf configuration is working, i.e. there are no stale repositories.
- Disable all non-CentOS repositories. You can re-enable the repos after the switch.
- Ensure you have at least 5GB of free space in /var/cache.
- All automatic updates, e.g. via yum-cron should be disabled.
When ready, execute centos2ol.sh script to start migration process for your Linux OS.
./centos2ol.sh
Checking for required packages...
Checking your distribution...
package epel-release is not installed
Checking for yum lock...
Checking for required python packages...
Identifying dnf modules that are enabled
Finding your repository directory...
Learning which repositories are enabled...
Repositories enabled before update include:
appstream
baseos
extras
Looking for yumdownloader...
Backing up and removing old repository files...
Removing CentOS-specific yum configuration from /etc/yum.conf
Downloading Oracle Linux release package...The centos2ol.sh script list down the installed packages and then replaces the CentOS standard yum repositories with that of Oracle Linux.


During the migration process your Linux OS packages has been replaced by the respective Oracle’s Linux supported software packages.

centos2ol.sh script has finished it’s work. Reboot your machine to start your operating system with new Linux Kernel.
rebootDuring system startup, the GRUB menu is now displaying two new entries for Linux Server. One for the standard Linux kernel, while the other is for the Unbreakable Enterprise Kernel (UEK).
Boot your Linux server with UEK.

After successful startup, you will reach at the Linux commandline (CLI) based login prompt.

Login as root user.
Checking New Linux Operating System
Check the current operating system version by executing following commands.
cat /etc/os-release
cat /etc/oracle-releaseOutput:
NAME="Oracle Linux Server"
VERSION="8.4"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="8.4"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Oracle Linux Server 8.4"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:8:4:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8"
ORACLE_BUGZILLA_PRODUCT_VERSION=8.4
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=8.4
Oracle Linux Server release 8.4
Also check the version of your new Linux Kernel.
uname -rOutput:
5.4.17-2102.202.5.el8uek.x86_64
Final Thoughts
Embarking on the journey to migrate from CentOS 8 to Oracle Linux is a strategic move towards stability and reliability. Our comprehensive guide ensures a smooth transition, safeguarding your data and maintaining operational continuity.
Struggling with AWS or Linux server issues? I specialize in configuration, troubleshooting, and security to keep your systems performing at their best. Check out my Freelancer profile for details.
Let me guide you through the migration journey, ensuring a seamless shift and empowering your system with enhanced performance and support.
FAQs
1. Can I migrate CentOS 8 to Oracle Linux without losing my data?
Yes, migrating using Oracle’s official migration script preserves your data and applications, but backing up your system beforehand is strongly recommended.
2. Will Oracle Linux receive security updates after migration?
Yes, Oracle Linux provides timely security patches and updates, ensuring your system stays secure post-migration.
3. Do all CentOS 8 applications work flawlessly on Oracle Linux?
Most applications will work without issues since Oracle Linux is binary compatible with RHEL, but testing critical applications after migration is advised.
4. Can I switch back to CentOS 8 if I encounter problems on Oracle Linux?
Switching back is complex and not officially supported, so maintain backups to restore your CentOS environment if needed.
5. Is a reboot required immediately after migrating to Oracle Linux?
Yes, a system reboot is required to complete the migration process and load Oracle Linux kernel and services properly.
Recommended Courses
If you’re serious about building a career in IT, the Complete Linux Training Course to Get Your Dream IT Job 2025 by Imran Afzal is one of the best investments you can make in yourself. This highly rated course takes you from the basics of Linux to advanced system administration skills, preparing you for real-world IT roles and certifications.
Whether you’re a beginner or brushing up your skills, the structured lessons, hands-on labs, and career-oriented approach make it a perfect choice to boost your confidence and job readiness. Enroll now and start your Linux journey today!
Disclaimer: This post contains affiliate links. If you purchase through these links, I may earn a small commission at no additional cost to you. This helps support the site and allows me to continue creating valuable content.

Leave a Reply
Please log in to post a comment.