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. The project’s aim is to provide a community-supported, production-grade enterprise operating system.
![](https://unixcop.com/wp-content/uploads/2022/01/pic1-5.png)
Prerequisites:
Backup project and important files/directories:
Take a full backup of your important config files, directories, project files and databases etc. So, if something goes wrong, we should be able to go back quickly.
Step # 1: Installing all updates on CentOS 8.
First, make sure all the existing packages on your system are up to date.
dnf update
![](https://unixcop.com/wp-content/uploads/2022/01/pic2-5.png)
![](https://unixcop.com/wp-content/uploads/2022/01/pic3-5.png)
Now, verify CentOS Linux 8 version.
cat/etc/redhat-release
OR
cat/etc/centos-release
![](https://unixcop.com/wp-content/uploads/2022/01/pic4-5.png)
Step # 2: Installing git client on CentOS 8.
We need git to install the migration script.
First, check if git is already installed on the server? Execute the command below.
type -a git
![](https://unixcop.com/wp-content/uploads/2022/01/pic5-5.png)
Let us search for the git package, Execute below command.
dnf list git
![](https://unixcop.com/wp-content/uploads/2022/01/pic6-6.png)
dnf search git
![](https://unixcop.com/wp-content/uploads/2022/01/pic7-6.png)
dnf info git
![](https://unixcop.com/wp-content/uploads/2022/01/pic8-3.png)
Now, install git on your server with the help of the dnf utility, Execute the command below.
dnf install git
![](https://unixcop.com/wp-content/uploads/2022/01/pic9-3.png)
![](https://unixcop.com/wp-content/uploads/2022/01/pic10-3.png)
type -a git
![](https://unixcop.com/wp-content/uploads/2022/01/pic11-3.png)
Clone the repo to install migration tool called rocky-tool
Finally, we need to clone the rocky-tools repo with the help of the git command:
cd /tmp/
git clone https://github.com/rocky-linux/rocky-tools.git
![](https://unixcop.com/wp-content/uploads/2022/01/pic12-2.png)
Step # 3: Migrating from CentOS 8 to Rocky Linux.
Change the directory using cd command where rocky-tools cloned:
cd /tmp/rocky-tools/migrate2rocky
Set up executable permissions using the chmod command:
chmod -v +x migrate2rocky.sh
Start the migration from CentOS 8 to Rocky Linux by typing the migrate2rocky.sh command:
./migrate2rocky.sh -r
![](https://unixcop.com/wp-content/uploads/2022/01/pic13-2.png)
![](https://unixcop.com/wp-content/uploads/2022/01/pic14-2.png)
Step # 4: Reboot the system.
Now, reboot server using following command:
systemctl reboot
Step # 5: Verification the Server version.
Check the server version using command below.
cat /etc/redhat-release
OR
cat /etc/rocky-release
![](https://unixcop.com/wp-content/uploads/2022/01/pic15-2.png)
Make sure there are no errors, execute the command below.
tail -f /var/log/messages
![](https://unixcop.com/wp-content/uploads/2022/01/pic-final.png)
Conclusion:
In this article you have learned how to migrate from CentOS 8 to Rocky Linux. Check out the Rocky Linux website for documentation and GitHub link.