If you want to migrate from different distros like CentOS, RHEL, Oracle, or any other RedHat based on Rocky Linux then you can follow the below steps.
- A hardware server or VPS
- Linux Distros like CentOS, Alma Linux, RHEL, or Oracle Linux
- Currently supported version of above distros is 8.4
- You should be aware about Linux Commands
- It is essential to have SSH knowledge for remote servers
- You must be as a root user or a user with sudo privilege.
The migration is officially supported by Rocky Linux. They have created a set of commands for it. You can find that on git using the below link.
As per Rocky Linux Officially, It’s a script that, when executed, will change out all of your repositories to those of Rocky Linux. Packages will be installed and upgraded/downgraded as necessary, and all of your OS’ branding will change too.
Prepare your Server To Migrate To Rocky Linux
You have to install git using the below command
dnf install git
Now you can clone the rocky-tools repository using the below command
git clone https://github.com/rocky-linux/rocky-tools.git
Note: this method will download all of the scripts and files in the rocky-tools repository.
Installation of Rocky Linux
If you have logged in to your server, then you can use the terminal to navigate to whatever folder contains the
Firstly, Change the permission to the file to make sure it is executable. So you can use the below command for that.
chmod +x migrate2rocky.sh
Secondly, you can execute the script,
-r the option tells the script to just go ahead and install everything.
If everything is in the right manner then you can see the terminal like as below.
Now, it’ll take the script a while to convert everything, depending on the actual machine/server, and the connection it has to the wider internet.
If you see this message at the end, everything has gone right. So, reboot your server to finish the job.
Once the reboot is done, check your machine using the hostnamectl command.
And you will get an output similar to the below picture.
In this tutorial, you learned to migrate the machine from CentOS, RHEL to Rocky Linux. So now you can enjoy using Rocky Linux. But if you have any query then you always ask in the comment section.