User Tools

Site Tools


informatica:servidor_internet_2009_debian_10_part_3

Servidor web/dades

Actualització a Debian 10.12 "buster" - Part 3 - Agost de 2022

Debian 10.12 es va publicar el 26 de març de 2022. Debian 10.0 es va publicar inicialment el 6 de juliol de 2019.

Aquesta pàgina conté la tercera part de la descripció detallada del procés d'actualització a Debian 10.12 “buster”.

[PENDENT] Install phpmyadmin

La instal·lació de phpmyadmin no s'ha pogut completar perquè requereix PHP-7, però mentre no actualitzi el servidor de reserves, hem de mantenir la versió PHP-5.

# apt install -f phpmyadmin                                                                                                                             
Reading package lists... Done                                                   
Building dependency tree                                                                                                                      
Reading state information... Done                                             
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable      
distribution that some required packages have not yet been created                                      
or been moved out of Incoming.                                       
The following information may help to resolve the situation:        
                                                                                                                                    
The following packages have unmet dependencies:                                                    
 phpmyadmin : Depends: php-twig (> 2.9) but 2.6.2-2 is to be installed                                                           
E: Unable to correct problems, you have held broken packages. 

# apt-cache madison php-twig
  php-twig | 2.14.3-1~bpo10+1 | http://ftp.es.debian.org/debian buster-backports/main amd64 Packages                                                                                     
  php-twig |    2.6.2-2 | http://ftp.es.debian.org/debian buster/main amd64 Packages
      twig |    2.6.2-2 | http://ftp.es.debian.org/debian buster/main Sources                                                                                                            
  php-twig | 2.14.3-1~bpo10+1 | http://ftp.es.debian.org/debian buster-backports/main Sources                  
root@sermnserver:/var/log/apache2# apt-cache madison phpmyadmin                                                                               
phpmyadmin | 4:5.0.4+dfsg2-2~bpo10+1 | http://ftp.es.debian.org/debian buster-backports/main amd64 Packages
phpmyadmin | 4:5.0.4+dfsg2-2~bpo10+1 | http://ftp.es.debian.org/debian buster-backports/main Sources     

# apt install php-twig/buster-backports            
Reading package lists... Done                                                                                                                                                            
Building dependency tree                                                                                       
Reading state information... Done                                                                                                             
Selected version '2.14.3-1~bpo10+1' (Debian Backports:buster-backports [all]) for 'php-twig'               
The following package was automatically installed and is no longer required:                                                                                                       
  php7.3-mysql                                                                                         
Use 'apt autoremove' to remove it.                                                                                                                                                       
Suggested packages:                                                                                    
  php-twig-doc                                                                                                                                                                           
The following NEW packages will be installed:                                   
  php-twig                                                                                                                                    
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.                
Need to get 121 kB of archives.                                          
After this operation, 906 kB of additional disk space will be used.     
Get:1 http://ftp.es.debian.org/debian buster-backports/main amd64 php-twig all 2.14.3-1~bpo10+1 [121 kB]
Fetched 121 kB in 1s (220 kB/s)                                                                             
Selecting previously unselected package php-twig.                                                                   
(Reading database ... 220929 files and directories currently installed.)                                                            
Preparing to unpack .../php-twig_2.14.3-1~bpo10+1_all.deb ...                                                                                                                          
Unpacking php-twig (2.14.3-1~bpo10+1) ...                                                                                        
Setting up php-twig (2.14.3-1~bpo10+1) ...                                                                                        

# apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  php7.3-mysql
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
After this operation, 458 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 221331 files and directories currently installed.)
Removing php7.3-mysql (7.3.33-4+0~20220627.98+debian10~1.gbp40b3e4) ...
Processing triggers for libapache2-mod-php7.3 (7.3.33-4+0~20220627.98+debian10~1.gbp40b3e4) ...
root@sermnserver:/var/log/apache2# php -v
PHP 5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

# apt install -f phpmyadmin
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  php-gettext php-php-gettext
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libc-ares2 libjs-bootstrap4 libjs-codemirror libjs-jquery-mousewheel libjs-jquery-timepicker libjs-openlayers libjs-popper.js libnode64 libuv1 node-jquery nodejs nodejs-doc php-apcu p
hp-google-recaptcha
  php-mariadb-mysql-kbs php-phpmyadmin-motranslator php-phpmyadmin-shapefile php-phpmyadmin-sql-parser php-psr-cache php-psr-container php-psr-log php-psr-simple-cache php-symfony-cache
 php-symfony-config
  php-symfony-dependency-injection php-symfony-expression-language php-symfony-filesystem php-symfony-yaml php-twig-i18n-extension php8.1-apcu
Suggested packages:
  libjs-requirejs npm php-dbase php-symfony-finder php-symfony-proxy-manager-bridge php-symfony-console php-recode php-gd2 php-pragmarx-google2fa-qrcode php-samyoul-u2f-php-server
The following NEW packages will be installed:
  libc-ares2 libjs-bootstrap4 libjs-codemirror libjs-jquery-mousewheel libjs-jquery-timepicker libjs-openlayers libjs-popper.js libnode64 libuv1 node-jquery nodejs nodejs-doc php-apcu p
hp-google-recaptcha
  php-mariadb-mysql-kbs php-phpmyadmin-motranslator php-phpmyadmin-shapefile php-phpmyadmin-sql-parser php-psr-cache php-psr-container php-psr-log php-psr-simple-cache php-symfony-cache
 php-symfony-config
  php-symfony-dependency-injection php-symfony-expression-language php-symfony-filesystem php-symfony-yaml php-twig-i18n-extension php8.1-apcu
The following packages will be upgraded:
  phpmyadmin
1 upgraded, 30 newly installed, 0 to remove and 0 not upgraded.
Need to get 14.8 MB of archives.
After this operation, 60.9 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 https://packages.sury.org/php buster/main amd64 php8.1-apcu amd64 5.1.21+4.0.11-8+0~20220625.32+debian10~1.gbpa7cde5 [45.1 kB]
Get:2 http://ftp.es.debian.org/debian buster/main amd64 libc-ares2 amd64 1.14.0-1+deb10u1 [86.1 kB]
Get:3 https://packages.sury.org/php buster/main amd64 php-apcu amd64 5.1.21+4.0.11-8+0~20220625.32+debian10~1.gbpa7cde5 [7,108 B]
...
Get:30 http://ftp.es.debian.org/debian buster-backports/main amd64 php-twig-i18n-extension all 3.0.0-2~bpo10+1 [8,076 B]
Get:31 http://ftp.es.debian.org/debian buster-backports/main amd64 phpmyadmin all 4:5.0.4+dfsg2-2~bpo10+1 [4,112 kB]
Fetched 14.8 MB in 4s (3,653 kB/s)       
Reading changelogs... Done
apt-listchanges: Mailing root: apt-listchanges: news for sermnserver
Extracting templates from packages: 100%
Preconfiguring packages ...
Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
Selecting previously unselected package php8.1-apcu.
(Reading database ... 221319 files and directories currently installed.)
Preparing to unpack .../00-php8.1-apcu_5.1.21+4.0.11-8+0~20220625.32+debian10~1.gbpa7cde5_amd64.deb ...
Unpacking php8.1-apcu (5.1.21+4.0.11-8+0~20220625.32+debian10~1.gbpa7cde5) ...
Selecting previously unselected package php-apcu.
Preparing to unpack .../01-php-apcu_5.1.21+4.0.11-8+0~20220625.32+debian10~1.gbpa7cde5_amd64.deb ...
Unpacking php-apcu (5.1.21+4.0.11-8+0~20220625.32+debian10~1.gbpa7cde5) ...
...
Setting up php-phpmyadmin-motranslator (5.2.0-1~bpo10+1) ...
Setting up phpmyadmin (4:5.0.4+dfsg2-2~bpo10+1) ...

Configuration file '/etc/phpmyadmin/apache.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** apache.conf (Y/I/N/O/D/Z) [default=N] ? n

Configuration file '/etc/phpmyadmin/config.inc.php'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** config.inc.php (Y/I/N/O/D/Z) [default=N] ? n
Installing new version of config file /etc/phpmyadmin/lighttpd.conf ...
Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
dbconfig-common: writing config to /etc/dbconfig-common/phpmyadmin.conf
creating database backup in /var/cache/dbconfig-common/backups/phpmyadmin_4:4.6.6-4+deb9u2.2022-08-05-16.31.02.
applying upgrade sql for 4:4.6.6-4+deb9u2 -> 4:4.8.5-1.
dbconfig-common: flushing administrative password
The blowfish_secret configured in /var/lib/phpmyadmin/blowfish_secret.inc.php is too weak and will be regenerated.
A backup of the file has been placed at /var/backups/phpmyadmin/blowfish_secret.inc.php
The webbased installer was disabled on debian with phpmyadmin version 4.9.1.
An existing configuration was found under /var/lib/phpmyadmin/config.inc.php.
A backup of the file has been placed at /var/backups/phpmyadmin/webbased-config.inc.php
apache2_invoke phpmyadmin: no action - configuration was disabled by local admin
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for doc-base (0.10.8) ...
Processing 1 changed doc-base file, 2 added doc-base files...
Registering documents with dwww...
Registering documents with scrollkeeper...
Processing triggers for libc-bin (2.28-10+deb10u1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for php8.1-cli (8.1.8-1+0~20220711.23+debian10~1.gbp5e9cbc) ...
Processing triggers for libapache2-mod-php8.1 (8.1.8-1+0~20220711.23+debian10~1.gbp5e9cbc) ...

però quan intento accedir a PHPMyAdmin em surt el missatge d'error,

  • PHP 7.1.3+ is required.
    Currently installed version is: 5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd

de forma que hauré de configurar Apache amb PHP-FPM perquè faci servir diferents versions de PHP en funció de quina aplicació web es visiti,

[CANCEL·LADA] Configuració d'Apache amb PHP-FPM

Comprovo quines versions de PHP hi ha instal·lades,

# ls -l /etc/php/
total 16
drwxr-xr-x 5 root root 4096 Aug  5 16:04 5.6
drwxr-xr-x 5 root root 4096 Aug  4 22:24 7.0
drwxr-xr-x 5 root root 4096 Aug  5 13:05 7.3
drwxr-xr-x 5 root root 4096 Aug  5 15:47 8.1

i desinstal·lo la versió 7.0 perquè ja hi ha instal·lada una versió de PHP 7 més actual,

# apt remove php7.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  php7.0
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 87.0 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 226316 files and directories currently installed.)
Removing php7.0 (7.0.33-60+0~20220627.68+debian10~1.gbp3d361a) ...

# apt remove php7.0-*
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'php7.0-tidy-dbgsym' for glob 'php7.0-*'
Note, selecting 'php7.0-sqlite3-dbgsym' for glob 'php7.0-*'
Note, selecting 'php7.0-vips-dbgsym' for glob 'php7.0-*'
...
Package 'php7.0-zstd' is not installed, so not removed
Package 'php7.0-zstd-dbgsym' is not installed, so not removed
The following packages will be REMOVED:
  libapache2-mod-php7.0 php7.0-bz2 php7.0-cli php7.0-common php7.0-gd php7.0-json php7.0-mbstring php7.0-opcache php7.0-pgsql php7.0-readline php7.0-xml php7.0-zip
0 upgraded, 0 newly installed, 12 to remove and 0 not upgraded.
After this operation, 16.5 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 226309 files and directories currently installed.)
Removing libapache2-mod-php7.0 (7.0.33-60+0~20220627.68+debian10~1.gbp3d361a) ...
apache2_invoke php7.0 prerm: No action required
Removing php7.0-bz2 (7.0.33-60+0~20220627.68+debian10~1.gbp3d361a) ...
...
Removing php7.0-readline (7.0.33-60+0~20220627.68+debian10~1.gbp3d361a) ...
Removing php7.0-common (7.0.33-60+0~20220627.68+debian10~1.gbp3d361a) ...
Processing triggers for man-db (2.8.5-2) ...

# apt list --installed | grep ^php7\.0

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Llavors instal·lo els paquets,

  • php5.6-fpm
  • libapache2-mod-php5.6
  • php7.3-fpm
  • libapache2-mod-php7.3
  • libapache2-mod-fcgid

però al final aquesta solució no em serveix perquè només funciona amb diferents hosts-virtuals, de forma que desinstal·lo els paquets instal·lats,

# apt remove php5.6-fpm php7.3-fpm libapache2-mod-fcgid
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  libapache2-mod-fcgid php5.6-fpm php7.3-fpm
...
Registering documents with scrollkeeper...

i comprovo que els corresponents serveis s'hagin aturat,

# systemctl status php5.6-fpm
? php5.6-fpm.service
   Loaded: masked (Reason: Unit php5.6-fpm.service is masked.)
   Active: inactive (dead) since Sun 2022-08-07 18:36:08 CEST; 3min 30s ago
 Main PID: 27345 (code=exited, status=0/SUCCESS)
   Status: "Processes active: 0, idle: 3, Requests: 45, slow: 0, Traffic: 0req/sec"

Aug 07 17:20:58 sermnserver systemd[1]: Starting The PHP 5.6 FastCGI Process Manager...
Aug 07 17:20:58 sermnserver systemd[1]: Started The PHP 5.6 FastCGI Process Manager.
Aug 07 18:36:08 sermnserver systemd[1]: Stopping The PHP 5.6 FastCGI Process Manager...
Aug 07 18:36:08 sermnserver systemd[1]: php5.6-fpm.service: Succeeded.
Aug 07 18:36:08 sermnserver systemd[1]: Stopped The PHP 5.6 FastCGI Process Manager.

# systemctl status php7.3-fpm
? php7.3-fpm.service
   Loaded: masked (Reason: Unit php7.3-fpm.service is masked.)
   Active: inactive (dead) since Sun 2022-08-07 18:36:17 CEST; 3min 34s ago
 Main PID: 27268 (code=exited, status=0/SUCCESS)
   Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec"

Aug 07 17:20:56 sermnserver systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...
Aug 07 17:20:56 sermnserver systemd[1]: Started The PHP 7.3 FastCGI Process Manager.
Aug 07 18:36:16 sermnserver systemd[1]: Stopping The PHP 7.3 FastCGI Process Manager...
Aug 07 18:36:17 sermnserver systemd[1]: php7.3-fpm.service: Succeeded.
Aug 07 18:36:17 sermnserver systemd[1]: Stopped The PHP 7.3 FastCGI Process Manager.

Tot seguit desactivo altres mòduls d'Apache que s'havien activat

# a2dismod actions fcgid proxy_fcgi
Module actions already disabled
Module fcgid already disabled
Module proxy_fcgi disabled.
To activate the new configuration, you need to run:
  systemctl restart apache2

Finalment, reinicio Apache per aplicar els canvis:

# apache2ctl configtest
Syntax OK
# systemctl restart apache2
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
informatica/servidor_internet_2009_debian_10_part_3.txt · Last modified: 2022/08/10 14:43 by miquel