Skip to main content

How to Migrate from CentOS 8 to AlmaLinux


 

A word of caution:

As usual, backup important data from your CentOS system before starting AlmaLinux migration task. I tested this script in a freshly installed CentOS 8 virtual machine. My VM doesn't has any data and it is a server edition with minimal installation. It worked just fine without any issues as expected.


Step 1: Update your CentOS system to latest available version as root or sudo user:

$ sudo dnf update

Step 2: Reboot your system to apply the updates:

$ sudo reboot

Let us check the current CentOS 8 version:

$ cat /etc/redhat-release

CentOS Linux release 8.3.2011

Yes, it is the latest version!

Step 3: Download the almalinux-deploy script using command:

$ curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh

Step 4: Go to the location where you downloaded the script and run the script to start Almalinux migration:

$ sudo bash almalinux-deploy.sh

This command will install some new packages, upgrade and downgrade some existing packages, reinstall a few packages and uninstall some packages.

This will take a couple minutes depending upon the Internet connection speed and the total number of installed packages in your CentOS system.

Sample output:

 Check root privileges                                                 OK

 Check Secure Boot disabled                                            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

 Remove centos-linux-release package                                   OK

 Remove centos-gpg-keys package                                        OK

 Remove centos-linux-repos package                                     OK

 Verifying…                          ################################# [100%]

 Preparing…                          ################################# [100%]

 Updating / installing…

    1:almalinux-release-8.3-4.el8      ################################# [100%]

 Install almalinux-release package                                     OK

 determining the fastest mirror (55 hosts).. done.    [===                                             ] ---  B/s |   0  B     --:-- ETA

 AlmaLinux 8 - BaseOS                                                                                    125 kB/s | 3.4 MB     00:27    

 AlmaLinux 8 - AppStream                                                                                 155 kB/s | 6.8 MB     00:44    

 AlmaLinux 8 - PowerTools                                                                                589 kB/s | 2.1 MB     00:03    

 AlmaLinux 8 - Extras                                                                                    3.3 kB/s | 3.6 kB     00:01    

 Dependencies resolved.

  Package                                 Architecture     Version                                             Repository           Size

 Upgrading:

  NetworkManager                          x86_64           1:1.26.0-13.el8_3                                   baseos              2.4 M

  NetworkManager-libnm                    x86_64           1:1.26.0-13.el8_3                                   baseos              1.7 M

  NetworkManager-team                     x86_64           1:1.26.0-13.el8_3                                   baseos              141 k

  NetworkManager-tui                      x86_64           1:1.26.0-13.el8_3                                   baseos              319 k

  dbus                                    x86_64           1:1.12.8-12.el8_3                                   baseos               40 k

  dbus-common                             noarch           1:1.12.8-12.el8_3                                   baseos               44 k

  dbus-daemon                             x86_64           1:1.12.8-12.el8_3                                   baseos              239 k

  dbus-libs                               x86_64           1:1.12.8-12.el8_3                                   baseos              182 k

  dbus-tools                              x86_64           1:1.12.8-12.el8_3                                   baseos               84 k

  device-mapper                           x86_64           8:1.02.171-5.el8_3.2                                baseos              372 k

[...]

Migrate to AlmaLinux from CentOS 8 using almalinux-deploy script

If the migration is successful, you will see the following message:


[...]

Complete!

Run dnf distro-sync -y                                                OK

AlmaLinux migration is completed


Step 5: Run the following command to synchronize installed packages to the latest available versions.

$ sudo dnf distro-sync -y 


Step 6: Reboot your system:

$ sudo reboot

Now your system will boot into the newly migrated AlmaLinux system:


Step 7: Login to your AlmaLinux system and check its version:

$ cat /etc/redhat-release 

AlmaLinux release 8.3 (Purple Manul)

Congratulations! AlmaLinux migration is successful!!


Step 8: You could have used the word "centos" in hostname and username. Simply change them wherever necessary to reflect AlmaLinux.

I am going to update the hostname:

$ sudo hostnamectl set-hostname almalinux8

Replace almalinux8 with your preferred hostname in the above command.


Step 9: Log out and log back in to verify if the changes have been made:

$ hostname

almalinux8

Yes, the changes are updated!


Check that the system boots AlmaLinux kernel by default using command:

$ sudo grubby --info DEFAULT | grep AlmaLinux

Sample output:

title="AlmaLinux (4.18.0-240.15.1.el8_3.x86_64) 8.3 (Purple Manul)"

All good! Start using your AlmaLinux!!

Comments

Popular posts from this blog

Cara Disable Antimalware Service Executable di Windows 10

Disadari atau tidak, Windows 10 (dan juga windows-windows lainnya) hadir dengan banyak sekali aplikasi bloatware (aplikasi yang tidak perlu-perlu amat dimiliki oleh end user). Contohnya, adalah aplikasi yang seharusnya sudah tergantikan fungsinya oleh antivirus, seperti Antimalware Service Executable . Aplikasi ini dicurigai membuat Windows 10 mengalami inefisiensi memori/RAM, memakan resource yang tinggi, dengan Load yang tinggi (tanpa limit terkadang). Nah, berikut adalah cara men-disable nya: Tekan tombol Windows + I untuk membuka apliaksi Windows Setting. Pilih icon menu Update and Security Pilih lagi menu disamping kiri Windows Security Pada jendela baru yang muncul, ada pilihan Virus & Threat protection Klik ini Lalu matikan proses Real-time protection tersebut. Dengan Regedit. Buka dialog regedit, Windows + R dan ketik ‘regedit’ Cari Folder regedit ini HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender Buat sebuah DWORD baru dengan klik kanan

Setup Debian 11 Official Repository In sources.list (/etc/apt/sources.list)

When you install Debian 11 using a DVD, the OS installer sets the DVD as the source for getting packages for your system if you didn't choose to scan for network mirrors. Due to this reason, the system would ask you to insert a DVD if the disc is not present in the DVD drive when you try to install any software.  Also, the packages on DVD may not be the latest release.  So, we need to get the packages from the Internet. Media change: please insert the disc labeled 'Debian GNU/Linux 11.0.0 _Bullseye_ - Official amd64 DVD Binary-1 20210814-10:04' in the drive '/media/cdrom/' and press [Enter] The /etc/apt/sources.list file with DVD as a source would look something like below. # deb cdrom:[Debian GNU/Linux 11.0.0 _Bullseye_ - Official amd64 DVD Binary-1 20210814-10:04]/ bullseye contrib main deb cdrom:[Debian GNU/Linux 11.0.0 _Bullseye_ - Official amd64 DVD Binary-1 20210814-10:04]/ bullseye contrib main deb http://security.debian.org/debian-security bullseye-security

How to Install Traefik in Debian (Without Docker)

 Download the suitable version of Traefik for your system from here: https://github.com/traefik/traefik/releases as an example, we'll be download the linux 64 bit version: wget https://github.com/traefik/traefik/releases/download/v2.8.7/traefik_v2.8.7_linux_amd64.tar.gz extract those package: tar -xzvf traefik_v2.8.7_linux_amd64.tar.gz set the traefik as executable and move the traefik binary to linux bin folder