diff options
| author | Davi Antônio da Silva Santos <antoniossdavi@gmail.com> | 2023-03-02 18:42:50 +0000 |
|---|---|---|
| committer | Davi Antônio da Silva Santos <antoniossdavi@gmail.com> | 2023-03-04 01:24:15 +0000 |
| commit | edee1c1af975e885903d2207f657c36275c2e220 (patch) | |
| tree | b5add13d2997767c2c15bddfc096cdac433db3a7 /debian/boca-web.postinst | |
| parent | 6695d2384069b7016398b2a55fc6962b1d8e6985 (diff) | |
| download | boca-edee1c1af975e885903d2207f657c36275c2e220.tar.gz boca-edee1c1af975e885903d2207f657c36275c2e220.zip | |
Migrate dependencies and maintainer scripts to PHP 8.1
The dependencies on PHP packages have been explicitly set to use PHP
version 8.1.
The boca-web post installation maintainer script has been updated with
extra descriptions and a the required steps to migrate from PHP 7.4.
Diffstat (limited to 'debian/boca-web.postinst')
| -rw-r--r-- | debian/boca-web.postinst | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/debian/boca-web.postinst b/debian/boca-web.postinst index 108693e..bcfce75 100644 --- a/debian/boca-web.postinst +++ b/debian/boca-web.postinst @@ -6,19 +6,39 @@ set -e chown -R www-data:www-data /var/www/boca chmod -R go-rwx /var/www/boca/src/private +# Stop the apache2 server before changing enabled modules +systemctl stop apache2 + +# Ensure that apache's embedded php module is not loaded +a2dismod php8.1 + +# Enable apache's shared object cache provider that uses a high-performance +# cyclic buffer inside a shared memory segment +# See https://httpd.apache.org/docs/2.4/socache.html a2enmod socache_shmcb -a2enmod proxy_fcgi -# Make sure embedded apache php module is not loaded -a2dismod php7.4 || true +# Recommended setup before enabling the php-fpm with apache httpd 2.4: enable +# fast CGI and set its environment variables +# Older tutorials recommended disabling the mpm_prefork module and enabling the +# mpm_event one before setting Fast CGI up, e.g. +# https://askubuntu.com/questions/1319861/how-to-configure-apache-http-to-php-fpm-on-ubuntu-20-10 +# Fortunately, Apache HTTPD version 2.4 already enables the mpm_event by default +# according the project's documentation +# https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM +a2enmod proxy_fcgi setenvif + +# Enable php-fpm module for apache +a2enconf php8.1-fpm -#enable php fpm instead -a2enconf php7.4-fpm +# Check the syntax of apache2's configuration file +# This DOES NOT CATCH ALL ERRORS +apache2ctl configtest -service apache2 restart || true +# Restart apache2 with the new configuration +systemctl start apache2 -#remember to reset possible stored password from debconf -db_reset boca-common/dbpassword || true +# Remember to reset possible stored password from debconf +db_reset boca-common/dbpassword # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. |