9

How to migrate from CentOS 8 to AlmaLinux (conversion)

 2 years ago
source link: https://www.cyberciti.biz/howto/how-to-migrate-from-centos-8-to-almalinux-conversion/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

How to migrate from CentOS 8 to AlmaLinux (conversion)

🐧 nixCraftHowto → How to migrate from CentOS 8 to AlmaLinux (conversion)

ADVERTISEMENT

I already wrote about migrating from CentOS 8 to CentOS Stream. I also have a guide about migrating from CentOS 8 to Rocky Linux. Today, I am working on another side project with my partner, and I wanted to try out AlmaLinux. Hence, this quick post will list steps to convert existing VM or bare metal server from CentOS 8 to AlmaLinux 8. The server currently acts as API for mobile apps, including PostgreSQL, Redis, Python+Django, Apache web server, and SELinux and firewalld.

ADVERTISEMENT

WARNING! Make a backup before you start upgrading and the conversion procedure. I am an experienced Linux user, developer and sysadmin. However, there is no substitute for backups. Keep verified backups. Do not proceed further without backups. The nixCraft is not responsible for data loss.

If you are doing this over an SSH session, I recommend running commands over GNU/screen or Tmux terminal multiplexer.

Migrating from CentOS 8 to AlmaLinux (conversion)

The procedure to migrate CentOS 8 Linux stable to AlmaLinux is as follows

  1. Log in as the root user:
    sudo -i
  2. Apply pending updates to CentOS 8 by running the dnf command/yum command:
    dnf update

    Apply pending updates before migration starts

  3. Reboot the Linux box when new kernel updates are installed:
    reboot
  4. After reboot, you need to download the almalinux-deploy.sh script using the wget or curl command, type:
    wget https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
    # read the script #
    vim almalinux-deploy.sh
  5. Next set up executable permission using the chmod command, run:
    chmod -v +x almalinux-deploy.sh

    Downloading almalinux-deploy.sh script

  6. Finally, migrate CentOS to AlmaLinux by typing the almalinux-deploy.sh:
    ./almalinux-deploy.sh

    AlmaLinux migration tool in action

  7. The upgrade and migration will take their own sweet time. It all depends upon your server hardware specification and the Internet speed. So wait and watch for errors on the screen. In the end, you should see a confirmation message as follows on screen:

    Complete!
    Run dnf distro-sync -y                                                OK
    Restoring of alternatives is done                                     OK
    Generating grub configuration file ...
    done
    All Secure Boot related packages which were released by not AlmaLinux are reinstalledOK
     
    Migration to AlmaLinux is completed
  8. Reboot the Linux box hosted at AWS or Linode:
    shutdown -r now
    Connection to 3.1x.2xx.2xx closed by remote host.
  9. Finally, verify the AlmaLinux version, run:cat /etc/redhat-release
    ## OR ##
    cat /etc/os-release

    CentOS to Almalinux migration successfully executed

  10. Also, make sure all services such as PGSQL, Apache and others are running using the ps command or ss command:
    ss -tulpn | more
    ss -tulpn | grep ":80"
    # Verify logs using the tail command and dmesg command+egrep command #
    tail -f /var/log/httpd/app_name_goes_here
    dmesg | egrep -i 'error|critical|warn'

Video tutorial

Summing up

Currently, I am using CentOS 8 Steam, Rocky Linux and Alma Linux. I wanted to study how three major CentOS 8 alternatives work in production, especially when providing updates. The admin part and commands are the same on all three distros except CentOS 8 Stream ABI/API, but I am not concerned about that right now.

And that is all folks. It was effortless to migrate from CentOS 8 Linux to AlmaLinux 8. Do check the AlmaLinux project website and Github repo.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via
RSS feed ➔   Weekly email newsletter ➔

ADVERTISEMENT


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK