Update the ISPConfig Perfect Server from Debian 10 to Debian 11

This tutorial will take you through updating a server managed by ISPConfig from Debian 10 (buster) to Debian 11 (bullseye). This guide works for both single- and multiserver setups. Just repeat the same steps on every server.

Warning: mailman2 is not supported in Debian 11, and mailman3 is not (yet) supported by ISPConfig.

Be aware that the update process may cause some downtime.

Prerequisites

1. Updating the system from Debian 10 to Debian 11

Go through the guide on updating Debian itself: https://www.howtoforge.com/how-to-upgrade-from-debian-10-to-debian-11/

2. Clean up mailman

If mailman2 was installed, we have to rename the data directory to prevent any mail transport conflicts.

mv /var/lib/mailman /var/lib/mailman-bk

Then run these commands:

mkdir -p /var/lib/mailman/data/
touch /var/lib/mailman/data/{aliases,transport-mailman,virtual-mailman}
postmap /var/lib/mailman/data/{aliases,transport-mailman,virtual-mailman}

to create some empty files instead.

3. Install missing PHP packages

Debian 11 ships with PHP 7.4 as default PHP version, so we have to install it (along with later needed curl):

apt -y install php7.4 php7.4-common php7.4-gd php7.4-mysql php7.4-imap php7.4-cli php7.4-cgi php7.4-curl php7.4-intl php7.4-pspell php7.4-sqlite3 php7.4-tidy php7.4-xmlrpc php7.4-xsl php7.4-zip php7.4-mbstring php7.4-soap php7.4-fpm php7.4-opcache php7.4-json php7.4-readline php7.4-xml curl

Don't forget to adjust the PHP config files if necessary.

If you still want to use PHP 7.3 for some websites, install it as an additional version by following https://www.howtoforge.com/tutorial/how-to-install-php-7-for-ispconfig-3-from-debian-packages-on-debian-8-and-9/

4. Run a force update of ISPConfig

To reconfigure the services so they are correctly configured for Debian 11, we need to run the ISPConfig update script and let it reconfigure services. Run the script from the command line with

ispconfig_update.sh --force

Go through the update steps. When asked whether you want to reconfigure services or not, hit enter. If you skip this step by answering "no", ISPConfig won't configure your services for Debian 11 and some services might be broken.

5. Update paths to use PHP 7.4 as default PHP version

As PHP 7.4 is the default PHP version shipped with Debian 11, we need to update the PHP paths in ISPConfig.

Log in to the panel as admin user and then go to System -> Server Config -> server1.example.com (the hostname of your server) -> Web -> PHP Settings

Replace the references to 7.3 to 7.4, so it looks like this:

Apache php.ini path: /etc/php/7.4/apache2/php.ini
CGI php.ini path: /etc/php/7.4/cgi/php.ini
PHP-FPM init script: php7.4-fpm
PHP-FPM php.ini path: /etc/php/7.4/fpm/php.ini
PHP-FPM pool directory: /etc/php/7.4/fpm/pool.d
PHP-FPM socket directory: /var/lib/php7.4-fpm

Be aware that all websites on this server that use the PHP version "Default" will now use PHP 7.4 instead of the old version.

We also have to let the system use PHP 7.4 as the default PHP handler for non-ISPConfig actions. To do this, run:

update-alternatives --config php

If you need to select a PHP version, select PHP 7.4. Then, run

update-alternatives --config php-cgi

If you need to select a PHP version, select PHP 7.4 as well. Lastly, run

update-alternatives --config php-fpm.sock

If you need to select a PHP version, select PHP 7.4 again.

For servers with Apache2 installed, we have to disable PHP-FPM 7.3 as the default PHP handler and enable PHP-FPM 7.4 by running these commands:

a2disconf php7.3-fpm
a2enconf php7.4-fpm
systemctl restart apache2

6. Update phpMyAdmin (optional)

If you have phpMyAdmin installed, we recommend updating your install as many users have an outdated version installed.

Run this command to run our phpMyAdmin update script:

curl https://git.ispconfig.org/ispconfig/tools/-/raw/master/auto_update_phpmyadmin.sh -sL | sh

You can keep phpMyAdmin updated automatically from now on by using this same script. See this forum post for more information: https://www.howtoforge.com/community/threads/keep-your-phpmyadmin-installation-up-to-date-automatically.88495/

We're done! If you have any problems, open a thread on the forum.

Share this page:

Suggested articles

9 Comment(s)

Add comment

Comments

By: Francesco at: 2022-02-28 09:19:34

There is a need to update so you do the guide or is only to explain how to do if someone want to do it?

Thank you

By: till at: 2022-02-28 09:37:40

There is no need to update. The Debian developers support Debian 10 with updates until June 2024.

By: muekno at: 2022-03-04 16:00:58

There may be a need to upgrade f some websites needs PHP 7.4 or something needs the new kernel. So thank Till for this tutorial.

By: ledufakademy at: 2022-03-06 14:31:06

Sorry but : "Be aware that all websites on this server that use the PHP version "Default" will now use PHP 7.4 instead of the old version"

this is not working because , i've got a "502 bad getway error"

By: Piotr at: 2022-03-07 08:17:39

I found a solution to the problem collecting mail in a queue "connect to 127.0.0.1 [127.0.0.1]: 10026: Connection refused". amavisd-new configban (/etc/amavis/conf.d/20-debian_defaults): $inet_socket_port = [10024, 10026];$interface_policy{'10026'} = 'POLICYVALAMI';$policy_bank{'POLICYVALAMI'} = {   bypass_spam_checks_maps   => [1],   final_virus_destiny => D_PASS,   final_spam_destiny   => D_PASS,};

More and the source of the solution: https://hup.hu/node/174834

By: till at: 2022-03-07 09:48:23

Hello Piotr, thank you for posting your workaround. The correct solution is different though and has been posted in the iSPConfig forum already a few days ago. I highly recommend that you undo your changes and follow the instruction that we posted here: https://www.howtoforge.com/community/threads/after-upgrading-from-buster-to-bullseye-problems-amavis.88528/#post-432778 to solve the issue.

With your workaround, your setup will likely stop working as soon as you install the next ISPConfig update.

By: Trashy at: 2022-04-03 11:15:51

Will you be updating this for debian 11? I see a lot has changed

By: till at: 2022-04-03 15:48:03

This tutorial is up to date, nothing has changed since the guide has been written as this guide is for Debian 11 as the target system. And Debian 12 does not exist yet, so a tutorial for updating Debian 11 to Debian 12 can't exist yet.

By: t0r at: 2022-04-25 21:48:03

You didn't say how to make phpMyAdmin use the default PHP 7.4 version. As of now, even after upgrading, phpMyAdmin shows v7.3. Even after restarting Apache2.