In this article, we will be discussing the process of migrating a Linode VM from CentOS 8 to Rocky Linux 8. The server in question runs a simple workload which includes PHP 8.1, MariaDB server, Nginx, SELinux and firewalld.
Rocky Linux is a highly regarded open-source operating system and is seen as a strong replacement option for CentOS 8. It is a 100% binary-compatible release that uses Red Hat Enterprise Linux (RHEL). In this article, we will be using a shell script provided by the Rocky Linux project to perform the migration.
Step 1: Backup CentOS 8
Before starting the migration process, it’s important to backup your data. Although the server in question has nightly backups, a snapshot was taken just in case anything goes wrong during the upgrade process.
Step 2: Installing Updates on CentOS 8
To install updates on the CentOS 8 server, log in using the ssh command:
ssh [email protected]
Next, use the dnf command to apply all pending updates:
sudo dnf update
Finally, reboot the Linux box using the shutdown command or reboot command:
sudo reboot
Step 3: Installing Git Client on CentOS 8
Git will be required to install the migration script. To check if git is already installed on the server, execute the type command:
type -a git
If git is not installed, use the dnf utility to install it:
sudo dnf install git
type -a git
Step 4: Migrating from CentOS 8 to Rocky Linux
Clone the repo to install the migration tool called rocky-tool:
cd /tmp/
git clone https://github.com/rocky-linux/rocky-tools.git
Change the directory using cd command where rocky-tools were 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
Follow the on-screen instructions and wait for the migration process to finish. Once it is done, reboot the box:
sudo systemctl reboot
Step 5: Verification
Verify the version to ensure that the server has been switched to Rocky Linux:
cat /etc/rockylinux-release
cat /etc/centos-release
hostnamectl
Make sure all the processes are running:
ss -tulpn | grep :80
ss -tulpn | grep :3306
Use the egrep command to filter out PHP, MySQL and Nginx processes:
ps aux | grep -E 'php|nginx|mysql'
ps aux | grep php-fpm
Ensure that no errors were reported by the system:
dmesg
dmesg | grep -Ei 'warn|error|notice|fail'
tail -f /var/log/my_app_1/log_file
tail -f /var/log/nginx/php_log
In conclusion, it was easy to migrate from CentOS 8 Linux or Red Hat Enterprise Linux 8 to Rocky Linux 8. Do check the Rocky Linux project website and Github link for more information.
About Me:I'm the digital marketing specialist, competent in SEO (Google, Yahoo & Bing), Google Adwords (Search, Display, Google Shopping etc.), Facebook & Instagram Advertising etc. I can work in all platforms of digital marketing & advertise the legitimate products/services in a specific country, city or all over the world.
Request a free quote
We offer professional SEO services that help websites increase their organic search score drastically in order to compete for the highest rankings even when it comes to highly competitive keywords.
About us and this blog
We are a digital marketing company with a focus on helping our customers achieve great results across several key areas.
Subscribe to our newsletter!
Recent Posts
- Top 3 SEO Tools Used by Experts in 2023
- The Most Essential Technical SEO Tools For Agencies
- Use ad extensions to enhance the performance of your ads
- Define your ideal customer persona to understand your target audience
- Optimize your landing pages to provide a seamless user experience
- Conduct keyword research to identify high-intent and long-tail keywords
- Monitor and adjust your campaigns based on data-driven insights
- Set Realistic Goals for successful digital marketing campaign
- Use Ad Extensions for better Pay per click Advertising
- Optimizing Your Landing Pages: A Key to Successful Pay Per Click Advertising
- Conducting Keyword Research: A Crucial Step in Pay Per Click Advertising
- Understand Your Target Audience and Create Effective Marketing Campaigns