Question
CentOS 7 reaches end-of-life on June 30, 2024. Does Plesk support an in-place upgrade from Centos 7 to AlmaLinux 8?
How such a conversion can be done?
Answer
We prepared a CLI script that in-place converts a Plesk server with CentOS 7 to AlmaLinux 8.
Warning: Plesk services, hosted websites, and emails will be unavailable during the conversion process for about 30 to 60 minutes. Server is going to be rebooted, conversion automatically progresses after reboot.
- Built-in precheck for LiteSpeed usage pending: https://webpros.atlassian.net/browse/PUP-28.
-
Create a server-wide backup in Plesk and/or create a server snapshot in advance, so it can be used as a recovery point in case the convention process fails.
-
Ensure that you have a way to restart the server without a direct SSH connection. A serial port connection to the server can be used to monitor the status of the conversion process in real time and to reboot the server if necessary.
-
Verify there are at least 2GB of free space on disk.
-
Connect to the server via SSH.
-
Download and prepare the script:
# wget https://github.com/plesk/centos2alma/releases/download/v1.4.0/centos2alma-1.4.0.zip
# unzip centos2alma-1.4.0.zip
# chmod 755 centos2alma
-
Run the script:
# ./centos2alma
-
Perl modules installed via CPAN are not supported. To forcefully remove them during the conversion, append the '--remove-unknown-perl-modules' flag:
# ./centos2alma --remove-unknown-perl-modules
-
If PostgreSQL version <10 is installed, is recommended to upgrade it prior to starting conversion. Alternatively, use the --upgrade-postgres flag to upgrade PostgreSQL during the conversion:
# ./centos2alma --upgrade-postgres
Note: flags can be combined if both of the above is the case:
# ./centos2alma --upgrade-postgres --remove-unknown-perl-modules
-
Comments
17 comments
You state ELevate does not support a further upgrade to AL9/RHEL9/RL9.
https://wiki.almalinux.org/elevate/ELevate-quickstart-guide.html
The ELevate website states differently. Will your Plesk script be supporting a further upgrade 8 to 9 or not?
Hello,
Thank you for your question. The direct upgrade path from CentOS 7 to Almalinux 9 is not supported. We will consider adding the possibility of adding the upgrade path CentOS 7 -> Almalinux 8 -> Almalinux 9 in the future. However, currently, we are fully concentrated on the CentOS7 -> Almalinux 8 upgrade scenario.
The article was updated with this information.
Hello,
does this also work for upgrading RHEL 7.9 to RHEL 8.8?
If it doesn't work, and I need to migrate Plesk from a RHEL 7.9 server to a new one RHEL 8.8 (or directly RHEL 9.2), is there a migrate-procedur?
Hello Gilberto,
Such an upgrade path is not supported for now. You may use Plesk Migrator extension to transfer all the data to a server with the newer OS instead: https://support.plesk.com/hc/en-us/articles/12377889325719.
no success with upgrade
I got unknown error during the process
Thank you for providing the script for in-place upgrading a Plesk server from CentOS 7 to AlmaLinux 8. I am using CloudLinux 7.9 (Boris Yegorov) based on Plesk Obsidian v18.0.59_build1800240229.10 os_CentOS 7.
I would like to know if this script is compatible with CloudLinux 7.9. If not, are there any plans to make it compatible in the future?
How much extra space will it take to upgrade to a new OS?
If I have about 7GB of free space, how much free space approximately will remain after the upgrade?
@Lukáš Švec
Hi, I got 1.5GB of disk space filled during the conversion on a test server. To be on a safe side, I would suggest at least 2GB, so you should be fine with 7GB.
Hi there,
I am getting below error while trying to doing instructions (CentOS to AlmaLinux:
//// error
[root@symbiota2 ~]# clear
[root@symbiota2 ~]# ls
README.pdf centos2alma centos2alma-1.3.1.zip parallels
[root@symbiota2 ~]# chmod 7555 centos2alma
[root@symbiota2 ~]# ./centos2alma
Doing preparation checks...
Preparation checks failed: Exception during checking of required pre-conversion condition 'checking if the last installed kernel is in use'
Traceback (most recent call last):
File "/root/centos2alma/pleskdistup/common/src/action.py", line 471, in make_checks
if not check.do_check():
File "/root/centos2alma/pleskdistup/common/src/action.py", line 443, in do_check
return self._do_check()
File "centos2almaconverter/actions/common_checks.py", line 88, in _do_check
last_installed_kernel_version = self._get_last_installed_kernel_version()
File "centos2almaconverter/actions/common_checks.py", line 85, in _get_last_installed_kernel_version
return max(versions)
ValueError: max() arg is an empty sequence
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "pleskdistup/main.py", line 107, in required_conditions_satisfied
failed_checks = check_flow.make_checks()
File "/root/centos2alma/pleskdistup/common/src/action.py", line 474, in make_checks
raise RuntimeError(f"Exception during checking of required pre-conversion condition {check.name!r}") from e
RuntimeError: Exception during checking of required pre-conversion condition 'checking if the last installed kernel is in use'
Conversion can't be performed due to the problems noted above
Hello,
Getting the same error as above. Can confirm that I'm attempting an upgrade from Centos 7.9.2009. Do you have any input or additional insight on the error?
Here are some commands and outputs that may assist.
/usr/bin/rpm -q -a kernel kernel-plus kernel-rt-core
kernel-3.10.0-693.el7.x86_64
kernel-3.10.0-693.21.1.el7.x86_64
kernel-3.10.0-693.2.2.el7.x86_64
rpm -q -a kern*
kernel-tools-3.10.0-693.21.1.el7.x86_64
kernel-tools-libs-3.10.0-693.21.1.el7.x86_64
kernel-headers-3.10.0-693.21.1.el7.x86_64
kernel-3.10.0-693.el7.x86_64
kernel-3.10.0-693.21.1.el7.x86_64
kernel-3.10.0-693.2.2.el7.x86_64
Thank you!
I have tried two production boxes so far, and both worked without incident, once I removed the no-longer-compatible versions of PHP/5.x and PHP/7.0.x
I have more boxes still to do, which are more complex than the first two but I'm optimistic that the script will perform as intended
Would the Plesk team be able to assist me with this migration if I signed up for the Technical Support Subscription?
Thanks for the script; I have a couple of issues:
Uninstalled PHP 7.0 using cli "plesk installer remove --components php7.0" and in the plesk installer page, php 7.0 is not shown - though php 7.4 does -
When running the script it returns:
Not supported PHP versions were detected: PHP 7.0.
Remove unsupported PHP packages via Plesk Installer to proceed with the conversion:
You can do it by calling the following command:
plesk installer remove --components php7.0
Please advice,
Thanks in advance
Required pre-conversion condition 'checking if grub is installed' not met:
The /etc/default/grub file is missing. GRUB may not be installed.
Make sure that GRUB is installed and try again.
Required pre-conversion condition 'checking if the last installed kernel is in use' not met:
The last installed kernel is not in use.
The kernel version in use is '3.10.0'. The last installed kernel version is '3.10.0-1160.119.1.el7.tuxcare.els2.x86_64'.
Reboot the system to use the last installed kernel.
Required pre-conversion condition 'check if the system not in a container' not met:
The system is running in a container-like environment (Virtuozzo container). The conversion is not supported for such systems.
Conversion can't be performed due to the problems noted above
And now I have no idea what to do ;-)
@Niels Deuter
It seems that the main issue here is that the server is a container; conversion of such systems is not yet supported by the script.
Please sign in to leave a comment.