How to Migrate from CentOS to Oracle Linux
With the shift in focus from the CentOS project to CentOS Stream, which will now serve as the upstream for RHEL, several CentOS alternatives have been proposed to replace CentOS 8.
For a long time, CentOS has been widely adopted by small businesses and developers in server environments due to its provision of the same stability and reliability as RHEL, but completely free of charge. However, since CentOS Stream is a rolling release and functions as a beta version for upcoming RHEL releases, it is definitely not recommended for production use.
Several alternatives have emerged as suitable replacements. AlmaLinux has proven to be a strong contender, offering 1:1
binary compatibility with RHEL. We've previously detailed how to migrate from CentOS 8 to AlmaLinux 8.4. Another solid alternative is Oracle Linux, which is fully compatible with RHEL, meaning that all applications and features remain unchanged on Oracle Linux.
In this guide, we’ll walk you through the steps required to migrate from CentOS to Oracle Linux.
CAUTION:
While our migration from CentOS 8 to Oracle Linux went smoothly, we cannot guarantee the same outcome for every environment.
As a precautionary measure, it’s highly recommended that you perform a complete backup of your system before starting the migration process. Additionally, ensure that you have a fast and stable internet connection to facilitate package updates and downloads of the latest Oracle Linux packages.
Having said that, follow the steps below to begin your migration.
Migrating from CentOS to Oracle Linux
Begin by logging into your CentOS system and upgrading it to the latest available version. At present, the most recent CentOS version is CentOS 8.4.
<code>$ sudo dnf update</code>
The upgrade may take some time, depending largely on your internet speed. Faster connections will naturally result in quicker upgrades.
Once completed, verify your current system version using the following command:
<code>$ cat /etc/redhat-release</code>
Next, download and run the migration script provided by Oracle on GitHub to assist in transitioning from CentOS to Oracle Linux. This script removes CentOS-specific packages and replaces them with their Oracle Linux counterparts. Currently, it supports CentOS versions 6, 7, and 8, but does not support CentOS Stream.
To download the script, execute the following curl command:
<code>$ curl -O https://raw.githubusercontent.com/oracle/centos2ol/main/centos2ol.sh</code>
This will download the migration script named centos2ol.sh.
Now assign executable permissions to the script using the chmod command:
<code>$ chmod x centos2ol.sh</code>
To start the migration process, run the script as follows:
<code>$ sudo bash centos2ol.sh</code>
As previously mentioned, the script performs multiple tasks. It first checks if all necessary packages are installed and installs any missing ones.
Then, it proceeds to back up and remove old CentOS repository files.
Following that, it enables Oracle Linux's App Stream and Base OS repositories while removing the corresponding CentOS ones.
Once the switch to Oracle Linux repositories is complete, it synchronizes with online repositories and upgrades the Oracle Linux packages, potentially reinstalling some components.
This entire procedure can be quite lengthy, so it’s advisable to allow at least 2–3 hours for completion—you might want to step away or attend to other tasks during this time. Upon finishing the switch, you'll be prompted to reboot your system.
Simply issue the following command:
<code>$ sudo reboot</code>
During the reboot process, the Oracle Linux logo will appear on the screen.
Shortly after, the Grub boot menu will display. The Oracle Linux Server option will be the first entry—press ENTER to proceed into Oracle Linux.
After logging in, verify the operating system version once again using:
<code>$ cat /etc/os-release </code>
And there you have it. We hope this guide proves helpful for your migration needs.
The above is the detailed content of How to Migrate from CentOS to Oracle Linux. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

ArtGPT
AI image generator for creative art from text prompts.

Stock Market GPT
AI powered investment research for smarter decisions

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

ToidentifyyourGPUonLinux,trythesesteps:1.Runlspci|grep-i'3d\\|vga'.2.Usesudolshw-Cdisplay.3.Check/proc/driver/nvidia/gpus/forNVIDIAGPUs.4.Runnvidia-smiifNVIDIAtoolsareinstalled.5.Installanduseinxi-Gfordetailed,formattedoutput.

TorunWindowsprogramsonLinux,trythesemethods:1.UseWinetodirectlyrun.exefiles.2.InstallPlayOnLinuxforeasierWinemanagement.3.SetupaWindowsvirtualmachinewithVirtualBox.4.UseLutristoinstallandrunWindowsgamesseamlessly.

Tolocateaprogram'sinstallationpathonLinux,use:1.whichprogram_nameforquickPATH-basedlookup.2.whereisprogram_nametofindbinaries,manpages,andsources.3.locatewithupdatedbandgrepforfastfilesearches.4.find/-typef-executable-name"program_name"fort

ToupdateAMDdriversonLinux,useyourdistribution’spackagemanagertoinstallupdatedMesadrivers,orinstallAMDGPU-Proforprofessionalneeds.Ubuntuuserscanusethe"AdditionalDrivers"toolforaneasyswitch.Advancedusersmaycompilekernelmodulesfromsource.Reboo

ToinstallVSCodeonLinux,usetheofficialAPTrepositoryforautomaticupdates,Snapforcross-distributioncompatibility,oramanualtarballforfullcontrol.Choosebasedonyoursystemandneeds.

TocheckdiskspaceonLinux,usedf-hforanoverviewofstorage,du-shtofinddirectorysizes,lsblktolistblockdevices,orinstallncduforaninteractiveanalysis.Thesetoolshelpmonitorandmanagediskusageefficiently.

TosetupaVPNonLinux:1.InstallOpenVPNandNetworkManager.2.Importan.ovpnfileorconfiguremanually.3.UseWireGuardforfasterconnections.4.Connectvianmcliforautomation.Ensurecredentialsandcertificatesareproperlyconfigured.

TofindaprocessIDinLinux,use:1.psaux|greptolistandfilterprocesses.2.pgrepfordirectPIDoutput.3.pidofforexactmatches.4.Check/procdirectoriesmanually.5.Usetoporhtopforreal-timemonitoringandsearch.
