Migration from CentOS 7 to AlmaLinux 8
Why?
As of 07.30.2024, support for CentOS 7 is discontinued. Installation and operation of the ispmanager 6 control panel on a server running CentOS 7 is not supported.
To get updates and ensure correct operation of the ispmanager 6 control panel, it's best to migrate to AlmaLinux.
Instructions
PLEASE NOTE!
The conversion is performed using a special script and the Elevate tool.
Backups
Before starting the conversion, be sure to create a system snapshot and database backup. This is an essential step because the consequences of conversion can be unpredictable, including complete inoperability of the server.
Make sure you have an opportunity to restore the server to serviceability before starting the conversion.
Preparation
Before running the script and performing the conversion, make sure that the server meets the conversion requirements.
OS requirements
Ensure that you are using the latest available version of CentOS 7 by running the command:
cat /etc/centos-release
The output should read as follows:
CentOS Linux release 7.9.2009 (Core)
If the OS version in the output is below that specified in the example, perform a system package update using the following command:
yum update
Since CentOS 7 packages have been moved to archived repositories, you may need to change the links to the system repositories by running the following two commands:
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=https://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
Next, repeat the command to update the packages.
Panel requirements
Make sure that the panel version installed on the server is at least 6.95.0. You can check the version in the “Help” or “Software info” section or by executing the command in the console:
/usr/local/mgr5/bin/core ispmgr -i
Server requirements
For correct conversion, please follow the server resource requirements below:
- at least 4 GB RAM;
- at least 5 GB of free disk space.
Also grub
, screen
and python3
packages should be installed on the server.
Other OS requirements
Certain system settings as well as installed packages may interfere with the conversion:
- Make sure that all third-party repositories are disabled;
- PHP versions installed from the “remi”, “rhel” and “sci” repositories may no longer work;
- Converting MySQL databases below 8.0.36 or MariaDB versions below 5.5.68 will corrupt these databases;\
- Using encrypted partitions will result in a conversion error;
- Using the
xfc ftype=0
parameter will result in a conversion error; - Make sure to remove the
floppy
,pata_acpi
andsata_via
drivers.
Conversion
Before the conversion, run a special Python script.
The script will check the requirements described above, after which the conversion will be started.
Download and unzip the script by executing the following commands:
curl -o centos7-to-alma8.tgz "http://download.ispmanager.com/tools/centos7-to-alma8.tgz"
tar -xzvf centos7-to-alma8.tgz
cd centos7-to-alma8
It is recommended to run the script in a separate virtual tab of the screen utility:
screen
python3 main.py -reboot
Before starting the check and conversion process, a warning message will be displayed:
- If you are ready to run the script, enter
yes
; - If you do not want to run the script at the moment, enter
no
.
Wait for the conversion process to complete, the server will be rebooted.
The original versions of the configuration files will be saved at /var/config_backups/
.
PLEASE NOTE!
The script may fail with an error for many reasons.
After correcting the errors, the script can be restarted, its execution will continue from the progress point it was interrupted at.
Logging
The script log is located at /root/centos7-to-alma8/convertation.log
.
The Elevate utility log is located at /var/log/leapp/upgrade.log
.
If the conversion is successful, a report file will be created at /root/centos7-to-alma8/convertation-report.txt
.
Common issues
- When using a combination of OpenLiteSpeed and PostgreSQL, PostgreSQL will be damaged after the conversion;
- When using Afterlogic, it will be replaced with RoundCube after the conversion, but Afterlogic will also continue to work;
- When using an older version of the panel where users were created with UIDs below the 1010 value, some Dovecot issues may arise after the conversion. To fix that, change the value of
first_valid_uid
to “500” in the/etc/dovecot/conf.d/10-mail.conf
file.