Hamsa K
Editor
5 min read | 3 years ago

How to Migrate to Rocky Linux 8 From Centos 8

How to Migrate from centos 8 to Rocky Linux 8

Rocky Linux is led by Gregory Kurtzer, founder of the CentOS project.Rocky Linux is a Linux distribution that is intended to be a downstream, complete binary-compatible release using the Red Hat Enterprise Linux operating system source code and also support for CentOS Linux 8 has been cut short, from December 31, 2029 to December 31, 2021.

In this guide we will upgrade centos 8 server to Rocky Linux 8.

Before upgrading to Rocky Linux, it will be better to take backup of importtant data like your website data and configuration files etc. while upgradation if your server crashes, you can restore from backup.

Also Read -> How to Install Docker and Docker Compose on Rocky Linux

Step1: update centos 8 to Latest version

Just upgrade your current CentOS 8 Linux system to latest available version using dnf commands

sudo dnf update
sudo dnf upgrade

once upgrade is done, reboot your server.

sudo reboot

Now check centos 8 version

cat /etc/redhat-release

Also Read -> How to Install Varnish with Apache on Centos 7

Step 2: download and run migration script

you can download the script called migrate2rocky which is developed by Rocky developers and it is available on the Github page.

curl -O https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh

once script is downloaded, set the permission to script to execute it.

sudo chmod +x migrate2rocky.sh 

Now run the script to migrate from centos 8 to Rocky linux

sudo bash migrate2rocky.sh -r

The script will automatically change the CentOS 8 Linux repositories, GPG keys and others. The script may take some time and its depends upon your Internet connection speed and system configuration etc.

The script also changes related to centos 8 system packages to rocky linux packages such as logos,back ground and license etc. once everything is done it dispalys below message.

Done, please reboot your system.
A log of this installation can be found at /var/log/migrate2rocky.log

To reboot, run below command.

sudo reboot

once system is rebooted, check the OS version with the following command.

cat /etc/os-release

sample output:

NAME="Rocky Linux"
VERSION="8.4 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel fedora"
VERSION_ID="8.4"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.4 (Green Obsidian)"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:rocky:rocky:8.4:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
ROCKY_SUPPORT_PRODUCT="Rocky Linux"
ROCKY_SUPPORT_PRODUCT_VERSION="8"

That's it. Now we have successfully migrated CentOS Linux 8 to Rocky Linux 8.

Also Read -> How to Install Multiple PHP Versions with Apache on Centos 7



Warning! This site uses cookies
By continuing to browse the site, you are agreeing to our use of cookies. Read our terms and privacy policy