Overview
This guide will show you how to Elevate Centos 7 to Almalinux 8 or Rocky Linux 8
Procedure
Step 1 : Upgrade the Current CentOS 7 System to make sure we have a completely upgraded system and reboot.
yum update -y
reboot
Step 2 : After reboot you will need to remove the following installed Apps from Webuzo
- Mysql/Mariadb
Before removing Mysql/Mariadb please take dump of all databases and then after upgrade you will have to import this dumped sql in Mysql/Mariadb to restore all databases
mysqldump -u root -p --all-databases > /path/to/file.sql
After executing above it will ask for Mysql/Mariadb password , you can fine the password at /var/webuzo/my.conf
- Openlitespeed
- Litespeed
- Bind
- Exim
- Dovecot
- Varnish
Note : Removing above Apps will not affect your respective apps data so after upgrade you can install the above apps it will work like before upgrade
Step 3 : Install ELevate
yum install -y http://repo.almalinux.org/elevate/elevate-release-latest-el$(rpm --eval %rhel).noarch.rpm
Step 4 : Install leapp packages and migration data for the OS you want to upgrade
Execute the following command if you want to upgrade to Almalinux 8
yum install -y leapp-upgrade leapp-data-almalinux
Execute the following command if you want to upgrade to Rocky Linux 8
yum install -y leapp-upgrade leapp-data-rocky
Step 5 : Start a preupgrade check.
leapp preupgrade
Note : Probably the check will fail, but don’t panic! In the meanwhile, the Leapp utility creates a report file at /var/log/leapp/leapp-report.txt that contains possible problems and recommended solutions.
If you see the output like above then then according to the official documentation, those three commands shown below solve the problem. Just run them one after the other
rmmod pata_acpi
echo PermitRootLogin yes | sudo tee -a /etc/ssh/sshd_config
leapp answer --section remove_pam_pkcs11_module_check.confirm=True
If you run the check again after the above solution, preupgrade check will succeed.
Note: If preupgrade check gives error or not showing green report then please resolve errors , you can check the errors from /var/log/leapp/leapp-report.txt .
Once you see the above green report after preupgrade then only proceed for step5.
Step 5 : Start the Upgrade Process
leapp upgrade
Be patient since the upgrade process could take some time. Once the migration is completed, you’ll be offered to reboot the system
reboot
A new entry in GRUB called ELevate-Upgrade-Initramfs
will appear. The system will be automatically booted into it.
See how the update process goes in the console.
Once the upgrade process done, it will reboot automatically and you will be welcomed by the AlmaLinux 8/ Rocky Linux 8 GRUB menu at boot time.
Verify the current OS is the one you need
Now you are successfully upgraded Centos 7 to Almalinux 8
Step 5 : Now let's make the Webuzo working as it was working before upgrade.
First execute the following command to update the correct OS version in Webuzo
/usr/local/emps/bin/php /usr/local/webuzo/cronh.php
Now install Mysql/Mariadb in Webuzo and import the dumped sql which you had taken before upgrade, you can execute the following command to import the dumped sql file in Mysql/Mariadb
mysql -u root -p < /path/to/file.sql
Note : Please make sure you do not install Mysql 5.7, install Mysql 8.0 or later as Almalinux does not support Mysql 5.7
After executing above it will ask for Mysql/Mariadb password , you can fine the password at /var/webuzo/my.conf
Once you restored the Mysql/Mariadb then reinstalled the Apps which you had removed before upgrade
- Openlitespeed
- Litespeed
- Bind
- Exim
- Dovecot
- Varnish