Rocky Linux 8 is one to one RHEL binary compatible Linux OS, its latest stable release 8.4 has been released. Thus, if you want to migrate from CentOS 8 to Rocky Linux, then here is the tutorial using the official migrate2rocky script.
Steps to migrate CentOS 8 to Rocky Linux 8
Before performing the below CentOS 8 to Rocky migration commands, make sure you have a backup for your system. Because many times few applications might not work after migration, thus, it would be a wise idea to take a full system snapshot.
1. Run system update & upgrade
The first thing we have to perform is to ensure that all the packages installed on our existing CentOS 8 are up to date and have their latest version. For this run the system update and upgrade command using DNF package manager.
sudo dnf update && sudo dnf upgrade
2. Migrate CentOS to Rocky using Script
Rocky developers have created a script called migrate2rocky available on the Github page of this Linux. Let’s download it on the existing CentOS system that we want to convert.
Change the permission of the downloaded script, so that we can execute it on our Linux operating system.
sudo chmod +x migrate2rocky.sh
4. Execute Script
The script will automatically change the CentOS 8 Linux repositories, GPG keys, logo, and other things to Rocky Linux. It may take some time depending upon your existing system size.
sudo bash migrate2rocky.sh -r
Once the migration is completed, you will get:
Done, please reboot your system.
A log of this installation can be found at /var/log/migrate2rocky.log
Now, sync the command and then simply reboot your system.
sudo dnf distro-sync -y
sudo reboot
5. Verify & Check OS Version
To confirm you have successfully migrated to Rocky Linux, let’s check the OS version.
Magento open source is a fantastic platform. Get your stores online with Magento Setup. This tutorial you to setup Magento with high performance Web Server – Nginx and secure the same with Lets Encrypt SSL Certificate.
Pre-Requisites
Server with Ubuntu – 18.0.4
SSH – Enabled
HTTP & HTTPS Ports enabled and should be accessible over the Web
SSH to your instance and let’s update and install dependencies, MySQL and Nginx
Let secure the Database & Create your DB Root Password
sudo mysql_secure_installation
Login to MySQL command line and execute the following queries to create database and user for magneto database access
CREATE DATABASE magentodb;
CREATE USER 'magentoadmin'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON magentodb.* TO ‘magentoadmin’@’localhost';
FLUSH PRIVILEGES;
exit;
Next we want to create the magneto user, group, folder and give correct permissions
How to Setup Vulnerability Scanning – Windows & Linux. Scan for Vulnerabilities and discover the weaknesses of a given system with open source tool Wazuh. Wazuh is a free, open source and enterprise-ready security monitoring solution for threat detection, integrity monitoring, incident response and compliance.
Delete line number 19 to 21 (File – /opt/tomcat/webapps/manager/META-INF/context.xml)
sed -i '18,20d' /opt/tomcat/webapps/manager/META-INF/context.xml
Add below lines in between i.e 19,20 and 21 number. (File – /opt/tomcat/webapps/manager/META-INF/context.xml)
sed -i '18i\' /opt/tomcat/webapps/manager/META-INF/context.xml
sed -i '19i\' /opt/tomcat/webapps/manager/META-INF/context.xml #kindly update IP Address
Delete line number 19 to 21 (File – /opt/tomcat/webapps/host-manager/META-INF/context.xml)
sed -i '18,20d' /opt/tomcat/webapps/host-manager/META-INF/context.xml
Add below lines in between i.e 18,19 and 20 number. (File – /opt/tomcat/webapps/host-manager/META-INF/context.xml)
sed -i '18i\' /opt/tomcat/webapps/host-manager/META-INF/context.xml
sed -i '19i\' /opt/tomcat/webapps/host-manager/META-INF/context.xml #kindly update IP Address
Remove version string from HTTP error messages
cd /opt/tomcat/lib
jar xf catalina.jar /opt/tomcat/lib/org/apache/catalina/util/ServerInfo.properties
sed -i '16,17d' /opt/tomcat/lib/org/apache/catalina/util/ServerInfo.properties
sed -i '16i\server.info=Apache Tomcat' /opt/tomcat/lib/org/apache/catalina/util/ServerInfo.properties
jar uf catalina.jar org/apache/catalina/util/ServerInfo.properties
rm -rf /opt/tomcat/lib/org