Migrate to AlmaLinux from Centos 8
AlmaLinux is a free and open source Linux distribution, created originally by CloudLinux to provide a community-supported, production-grade enterprise operating system that is binary-compatible with Red Hat Enterprise Linux. The first stable release of AlmaLinux was published on March 30, 2021.
CentOS 8 Linux will be not supported by the end of the year 2021 and if you want to migrate it to AlmaLinux 8,you can follow this article.
In this guide, we will show you how to migrate to Alma Linux from centos 8
Note: Please make sure take important data backup before migrating to Alma Linux. if anything goes wrong during migration,you can restore from backup.
Step 1: update centos 8 system
Before updating, will check the centos version
[lampblogs@localhost ~]$ cat /etc/redhat-release
CentOS Linux release 8.0.1905 (Core)
Also Read -> How to Install Apache Maven on Rocky Linux
update all the packages to the latest version with following command.
sudo dnf update
once packages are updated Reboot your system
sudo reboot
Now check the version
[lampblogs@localhost ~]$ cat /etc/redhat-release
CentOS Linux release 8.4.2105
Also Read -> How to Install PostgreSQL on Rocky Linux
Step 2: download and run AlmaLinux script
To download the AlmaLinux migration script, run the following command.
curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
Next set the permissions to execute the script
sudo chmod +x almalinux-deploy.sh
Now run the script as below
sudo bash almalinux-deploy.sh
script runs few system checks.It then goes ahead to uninstall,reinstall,upgrade some packages to synchronize them with the latest release of AlmaLinux.
output:
Check root privileges OK
Check centos-8.x86_64 is supported OK
Download RPM-GPG-KEY-AlmaLinux OK
Import RPM-GPG-KEY-AlmaLinux to RPM DB OK
Download almalinux-release package OK
Verify almalinux-release package OK
Your OS is supported OK
Remove OS specific rpm packages OK
Verifying... ########################################
Preparing... ########################################
Updating / installing...
almalinux-release-8.4-3.el8 ########################################
Install almalinux-release package OK
Remove centos-backgrounds centos-logos centos-indexhtml packages OK
Also Read -> How to Install Docker and Docker Compose on Rocky Linux
this process takes some time to complete. once it is completed it will display the at the end as shown below.
xz-libs-5.2.4-3.el8.x86_64
yajl-2.1.0-10.el8.x86_64
yelp-2:3.28.1-3.el8.x86_64
yelp-libs-2:3.28.1-3.el8.x86_64
yelp-tools-3.28.0-3.el8.noarch
yelp-xsl-3.28.0-2.el8.noarch
yum-4.4.2-11.el8.noarch
zenity-3.28.1-1.el8.x86_64
zip-3.0-23.el8.x86_64
zlib-1.2.11-17.el8.x86_64
Complete!
Run dnf distro-sync -y OK
Restoring of alternatives is done OK
Generating grub configuration file ...
File descriptor 5 (/var/log/almalinux-deploy.debug.log) leaked on vgs invocation. Parent PID 104330: /usr/sbin/grub2-probe
File descriptor 5 (/var/log/almalinux-deploy.debug.log) leaked on vgs invocation. Parent PID 104330: /usr/sbin/grub2-probe
File descriptor 5 (/var/log/almalinux-deploy.debug.log) leaked on vgs invocation. Parent PID 104902: /usr/sbin/grub2-probe
File descriptor 5 (/var/log/almalinux-deploy.debug.log) leaked on vgs invocation. Parent PID 104902: /usr/sbin/grub2-probe
done
All Secure Boot related packages which were released by not AlmaLinux are reinstalledOK
Migration to AlmaLinux is completed
Then run following command to synchronize installed packages
sudo dnf distro-sync -y
Next,reboot your system to boot into the fresh instance of AlmaLinux
sudo reboot
Also Read -> How to Migrate to Rocky Linux 8 From Centos 8
while booting the grub menu will appear with the AlmaLinux as shown below
once your system is booted, you can verify the AlmaLinux operating system version using the following command.
cat /etc/os-release
output:
NAME="AlmaLinux"
VERSION="8.4 (Electric Cheetah)"
ID="almalinux"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.4"
PLATFORM_ID="platform:el8"
PRETTY_NAME="AlmaLinux 8.4 (Electric Cheetah)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:almalinux:almalinux:8.4:GA"
HOME_URL="https://almalinux.org/"
DOCUMENTATION_URL="https://wiki.almalinux.org/"
BUG_REPORT_URL="https://bugs.almalinux.org/"
ALMALINUX_MANTISBT_PROJECT="AlmaLinux-8"
ALMALINUX_MANTISBT_PROJECT_VERSION="8.4"
That's it. Now you have successfully migrated from centos 8 to Alma Linux.
Also Read -> How to Migrate from Centos 8 to Alma Linux 8