Select your language

Live Chat

From CentOS to Almalinux

From CentOS to Almalinux

Author: Peter

September 30, 2024

AlmaLinux: The Essential Migration for Web Hosting Companies Post-CentOS End-of-Life

With the recent announcement of CentOS Linux reaching its End-of-Life (EOL), web hosting companies across the globe are facing a crucial challenge. CentOS, a long-standing favorite for web hosting servers due to its stability and enterprise-grade features, will no longer receive critical patches or security updates. This puts systems at risk of vulnerabilities and performance issues. The time to migrate is now, and AlmaLinux has emerged as the leading replacement, offering a seamless, open-source, and enterprise-level solution that is fully compatible with Red Hat Enterprise Linux (RHEL).

Why AlmaLinux is the New Standard

AlmaLinux, developed by the AlmaLinux OS Foundation, is designed to be a one-to-one binary compatible replacement for CentOS. It provides the same reliability, performance, and security that web hosting companies expect from a RHEL-compatible operating system, without the hefty subscription costs. As a free, open-source distribution, AlmaLinux is rapidly becoming the new standard for those who relied on CentOS for their server infrastructure.

Reasons to Migrate to AlmaLinux

  1. Critical Security and Patch Support: With CentOS EOL, critical patches and security updates will no longer be available, leaving systems vulnerable. AlmaLinux will continue to receive timely security patches and updates, ensuring your web hosting environment remains secure and compliant with industry standards.
  2. CentOS EOL Security Risk: Running outdated systems like CentOS post-EOL exposes your hosting infrastructure to significant security risks. Hackers often target unpatched systems, leading to potential data breaches or service disruptions. Migrating to AlmaLinux ensures that your hosting servers stay protected with the latest security protocols.
  3. Seamless Migration Process: AlmaLinux provides an easy and seamless migration path for existing CentOS users. The Elevate Project offers tools designed to assist in migrating CentOS 7.x to AlmaLinux 8.x with minimal downtime, while maintaining existing configurations and services. For detailed migration steps, consult the AlmaLinux Migration Guide.
  4. Enterprise-Level Performance: AlmaLinux is a fully-featured, enterprise-grade operating system. Its compatibility with RHEL makes it ideal for hosting critical websites, applications, and databases. Web hosting companies looking for performance, stability, and long-term support can rely on AlmaLinux for their infrastructure needs.

The AlmaLinux Migration Process

Migrating from CentOS to AlmaLinux is straightforward, thanks to the comprehensive tools and resources provided by the AlmaLinux OS Foundation. Here’s a brief overview of the steps:

  • Backup Your Data: Before starting the migration, back up your entire system.
  • Install the AlmaLinux Migration Tool: AlmaLinux provides an easy-to-use migration tool. Instructions are available in the AlmaLinux Migration Guide.
  • Run the Migration Tool: This tool converts your CentOS system to AlmaLinux, keeping your settings, applications, and data intact.
  • Test and Validate: After migration, ensure that all your services are running smoothly, and conduct thorough testing.

For companies running CentOS 7, the Elevate Project simplifies the migration to AlmaLinux 8, ensuring a smooth transition with minimal impact on your operations.

AlmaLinux vs. Extended Lifecycle Support (ELS) for CentOS

Some companies may consider using Extended Lifecycle Support (ELS) from TUXCare, which offers patches and support for CentOS beyond its official EOL. However, this comes with additional costs and may not be a long-term solution for web hosting companies. AlmaLinux offers a more sustainable, free, and fully supported alternative that avoids the ongoing expenses associated with ELS solutions.

The Role of ServerDirect in Your AlmaLinux Migration

At ServerDirect, we understand the unique needs of web hosting companies, especially in light of the shift from CentOS to AlmaLinux. The hardware requirements for hosting depend on factors such as the number of websites, email users, and whether virtualization is in use. Although there is limited public information on the specific requirements for AlmaLinux in hosting environments, ServerDirect’s team of experts can help you configure the optimal infrastructure.

We provide tailored server solutions, whether you need physical or virtualized environments, to ensure that your hosting infrastructure is optimized for AlmaLinux. ServerDirect is ready to support your migration, offering custom configurations and ongoing technical support to keep your operations running smoothly.

Conclusion: Act Now to Secure Your Hosting Infrastructure

With CentOS Linux going End-of-Life, web hosting companies must act quickly to avoid potential security risks and disruptions. AlmaLinux is the perfect replacement, offering a free, enterprise-level, and RHEL-compatible solution. By migrating to AlmaLinux, you can ensure the long-term stability, security, and performance of your hosting infrastructure.

How to Migrate

The minimal supported version of EL8 operating systems is 8.4. In case your OS version is lower, please, upgrade it.

TIP

It's recommended to have a backup or snapshot of your system. There'll be a restore point if something will go wrong.

Follow these steps to convert your EL8 or EL9 system to AlmaLinux using CLI:

  • Run the following command to update your operating system if needed:
sudo dnf update -y
curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
  • Run the script:
sudo bash almalinux-deploy.sh
  • Check the output for any errors. If the conversion went without any issues, you'll see that Migration to AlmaLinux is completed in the output.
  • Reboot the system to boot with AlmaLinux kernel:
sudo reboot
  • Ensure that your system was successfully converted:
    • Check the release file:
    $ cat /etc/redhat-release
    AlmaLinux release 8.7 (Stone Smilodon)
    
    • Check that the system boots with AlmaLinux kernel by default:
    $ sudo grubby --info DEFAULT | grep AlmaLinux
    title="AlmaLinux (4.18.0-425.3.1.el8.x86_64) 8.7 (Stone Smilodon)"
    

Migrating from CentOS versions lower than 8.4

There are a few additional moments when you are converting your CentOS System. CentOS 8.4 or 8.5 is required to convert to AlmaLinux. If your CentOS version is lower, it is recommended to update it to 8.5 before converting to AlmaLinux. Though, it's not necessary if your CentOS version is at least CentOS 8.4.

  • As of January 31, 2022, the CentOS 8 mirror lists are offline. To successfully perform dnf update -y you need to update your dnf config files to point to a valid mirror. You can use the following sed commands for convenience to restore dnf to a functional state that will let you update to 8.5 and subsequently AlmaLinux.
sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[baseos\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/BaseOS/$basearch/os' /etc/yum.repos.d/CentOS-Linux-BaseOS.repo
sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[appstream\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/AppStream/$basearch/os' /etc/yum.repos.d/CentOS-Linux-AppStream.repo
sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[cr\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/ContinuousRelease/$basearch/os' /etc/yum.repos.d/CentOS-Linux-ContinuousRelease.repo
sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[devel\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/Devel/$basearch/os' /etc/yum.repos.d/CentOS-Linux-Devel.repo
sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[extras\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/extras/$basearch/os' /etc/yum.repos.d/CentOS-Linux-Extras.repo
sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[fasttrack\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/fasttrack/$basearch/os' /etc/yum.repos.d/CentOS-Linux-FastTrack.repo
sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[ha\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/HighAvailability/$basearch/os' /etc/yum.repos.d/CentOS-Linux-HighAvailability.repo
sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[plus\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/centosplus/$basearch/os' /etc/yum.repos.d/CentOS-Linux-Plus.repo
sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[powertools\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/PowerTools/$basearch/os' /etc/yum.repos.d/CentOS-Linux-PowerTools.repo

TIP

Alternatively, you can use the -f flag to handle this for you when running the almalinux-deploy.sh (opens new window) script:

sudo bash almalinux-deploy.sh -f
  • Run the following command to update your operating system:
sudo dnf update -y
  • Reboot the system after the updating:
sudo reboot
curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
  • Run the script:
sudo bash almalinux-deploy.sh
  • Ensure that your system was successfully converted:
    • check the release file
    $ cat /etc/redhat-release
    AlmaLinux release 8.7 (Stone Smilodon)
    
    • check that the system boots with AlmaLinux kernel by default
    $ sudo grubby --info DEFAULT | grep AlmaLinux
    title="AlmaLinux (4.18.0-425.3.1.el8.x86_64) 8.7 (Stone Smilodon)"
                
We offer worldwide delivery, including Amsterdam, Brussels, Paris, Madrid, Rome, and more.