Excellent software and practical tutorials
What is Rocky Linux? Who is Rocky Linux?
Rocky Linux is an open source enterprise operating system designed to be bug-compatible with Red Hat Enterprise Linux ® 100%. It is under intensive community development.
Rocky Linux aims to be a full downstream binary compatible version of the Red Hat Enterprise Linux operating system source code. The project aims to provide a community-supported and production-ready enterprise operating system. Rocky Linux, Red Hat Enterprise Linux, and SUSE Linux Enterprise have become popular choices for enterprise operating systems.
Depend on CentOS There are many existing users. Here is how to migrate from CentOS or other Linux to Rocky Linux.
Before migrating, you need to know, what is CentOS?
CentOS was originally a version of CAOS Linux created by Gregory Kurtzer. In June 2006, the main developer of Tao-Linux (a Red Hat Linux clone) announced the retirement of the distribution and devoted himself to CentOS. At this time, CentOS became a realRHELTwo years later, CentOS replaced Debian as the most popular Linux distribution for web servers.
In 2014, Red Hat became an official sponsor of CentOS. All CentOS trademarks were transferred to Red Hat. The development of CentOS surged, which helped the distribution gain widespread adoption among enterprise users.
IBM has taken a radical move by ending the CentOS that many users know and love and moving to a rolling release distributionCentOS StreamReplace it. In simple terms, rolling release means that all software is updated frequently. Instead of annual (or regular) major and minor iterations, rolling releases keep everything updated all the time.
However, CentOS Stream is not meant to be a replacement for the rock-solid CentOS. At best, CentOS Stream is a testing ground where users can get a feel for what the latest version of RHEL may offer.
CentOS Stream was announced less than a week ago. The original creator of CentOS (Kurtzer) announced Rocky Linux, it will be a "community enterprise operating system designed to be bug-for-bug compatible with 100%'s Enterprise Linux.
How to migrate from Centos to Rocky Linux
How to convert another Linux operating system into a fully functional Rocky Linux system. This is probably one of the most circuitous ways to install Rocky Linux, but it will come in handy in various situations.
For example, some server vendors won't support Rocky Linux by default for the time being. Or you might have a production server that you want to convert to Rocky Linux without reinstalling everything.
Well, we have the tools for you:Migrate2rocky.
This is a script that when executed will change all your repositories to those of Rocky Linux. Packages will be installed and upgraded/downgraded as needed and all OS branding will change as well.
Don't worry if you're new to system administration, I've tried to keep it as user-friendly as possible. Well, as user-friendly as the command line can be.
Prerequisites and Assumptions
- CentOS Stream, CentOS,Alma Linux, RHEL, or Oracle Linux Runs well on hardware servers or VPS. The current supported version of each is 8.5.
- Working knowledge of the command line.
- Working knowledge of SSH to remote machines.
- A mildly adventurous attitude.
- All commands should be run as root. Either log in as root or be prepared to type "sudo".
Precautions and Warnings
- Please check the migrate2rocky README page (linked above) as there are known conflicts between the script and Katello's repository. We will likely find (and eventually fix) more conflicts and incompatibilities over time, so you'll want to be aware of those, especially for production servers.
- This script will most likely work correctly on a fresh install.If you want to convert your production server, for the love of all good things,Perform data backups and system snapshots, or do them in a staging environment first.
Prepare your server
You need to get the actual script file from the repository. This can be done in a number of ways.
Manual method
Download the zip file from GitHub and extract the files you need (iemigrate2rocky.sh). You can find the zip file for any GitHub repo on the right side of the repo homepage:
Then, upload the executable to the server using ssh by running the following command on your local machine:
scp PATH/TO/FILE/migrate2rocky.sh root@yourdomain.com:/home/
Just, you know, adjust all the file paths and server domains or IP addresses as necessary.
The git way
Install git on your server:
dnf install git
Then clone the rocky-tools repository:
git clone https://github.com/rocky-linux/rocky-tools.git
NOTE: This method will download all scripts and files in the rocky-tools repository.
Simple but less secure method
OK, this isn't necessarily the best practice from a security perspective. However, it is the easiest way to get the script.
Run this command to download the script into whatever directory you are working in:
curl https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh -o migrate2rocky.sh
This command will download the file directly to your server, andOnlyDownload the file you want. But again, there are security issues that suggest this isn't necessarily best practice, so keep that in mind.
Execute the script and install
Use the cd command to switch to the directory where the script is located, ensure that the file is executable, and grant the script file owner x permission.
chmod u+x migrate2rocky.sh
Execute the script:
./migrate2rocky.sh -r
The "-r" option tells the script to go ahead and install everything.
If you did everything correctly, your terminal window should look something like this:
Now, it will take a while for the script to convert everything, depending on the actual machine/server, and its connection to the wider internet.
If you see a FULL ! message at the end, then all is well and you can restart the server.
Give it some time, log back in, and you should have a fancy new Rocky Linux server to play with... and I mean do some serious work with. Runhostnamectl command to check if your OS has been migrated correctly and everything went well.