User Tools

Site Tools


informatica:servidor_internet_2009_debian_10_part_1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
informatica:servidor_internet_2009_debian_10_part_1 [2022/08/09 16:37]
miquel [Actualització a Debian 10.12 "buster" - Part 1 - Agost de 2022]
informatica:servidor_internet_2009_debian_10_part_1 [2022/08/10 14:42] (current)
miquel [Referències]
Line 5: Line 5:
 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. 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 descripció detallada del procés d'actualització a Debian 10.12 "buster".+Aquesta pàgina conté la primera part de la descripció detallada del procés d'actualització a Debian 10.12 "buster".
  
 Les instruccions i recomanacions per instal·lar Debian 9 "stretch" estan disponibles a: Les instruccions i recomanacions per instal·lar Debian 9 "stretch" estan disponibles a:
Line 818: Line 818:
  
  
-==== Instal·lació de PHP5 ==== 
  
-Segueixo les instruccions a [[https://tecadmin.net/install-apache-php-fpm-debian-10/ | https://tecadmin.net/install-apache-php-fpm-debian-10/]] per instal·lar PHP-5 a partir del magatzem Sury, 
- 
-Primer edito el contingut del fitxer ///etc/apt/sources.list.d/06-php-from-sury.list// per activar el magatzem Sury 
- 
-<file> 
-$ cat /etc/apt/sources.list.d/06-php-from-sury.list 
-     ## deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ buster main 
- 
-     deb https://packages.sury.org/php/ buster main 
- 
-# apt update 
-Hit:1 http://security.debian.org buster/updates InRelease 
-Hit:2 http://ftp.es.debian.org/debian buster InRelease                                 
-Get:3 https://packages.sury.org/php buster InRelease [6,837 B]                         
-Hit:4 http://ftp.es.debian.org/debian buster-updates InRelease           
-Hit:5 http://ftp.es.debian.org/debian buster-backports InRelease 
-Get:6 http://ftp.es.debian.org/debian buster/main DEP-11 48x48 Icons [3,770 kB] 
-Get:7 https://packages.sury.org/php buster/main amd64 Packages [364 kB] 
-Get:8 http://ftp.es.debian.org/debian buster/contrib DEP-11 48x48 Icons [56.4 kB] 
-Get:9 http://ftp.es.debian.org/debian buster/non-free DEP-11 48x48 Icons [3,491 B] 
-Fetched 4,200 kB in 2s (2,766 kB/s)                               
-Reading package lists... Done 
-Building dependency tree        
-Reading state information... Done 
-54 packages can be upgraded. Run 'apt list --upgradable' to see them. 
-root@sermnserver:/etc/apt/sources.list.d# apt list --upgradable 
-Listing... Done 
-enchant/buster 1.6.1-1+0~20210212.1+debian10~1.gbp73138d amd64 [upgradable from: 1.6.0-11.1+b1] 
-libapache2-mod-php7.0/buster 7.0.33-60+0~20220627.68+debian10~1.gbp3d361a amd64 [upgradable from: 7.0.33-0+deb9u12] 
-... 
-Get:68 https://packages.sury.org/php buster/main amd64 php7.3 all 7.3.33-4+0~20220627.98+debian10~1.gbp40b3e4 [49.1 kB] 
-Get:69 https://packages.sury.org/php buster/main amd64 python3-libxml2 amd64 2.9.14+dfsg-0+0~20220524.12+debian10~1.gbpc5dc45 [205 kB] 
-Fetched 25.3 MB in 2s (10.2 MB/s)      
-Reading changelogs... Done 
-Extracting templates from packages: 100% 
-(Reading database ... 220576 files and directories currently installed.) 
- 
- 
- 
- 
- 
-</file> 
- 
-<file> 
-# php -v                                                                                                                                    
-PHP 8.1.8 (cli) (built: Jul 11 2022 08:53:35) (NTS)                                                     
-Copyright (c) The PHP Group                                                                                                                                                               
-Zend Engine v4.1.8, Copyright (c) Zend Technologies                                                     
-    with Zend OPcache v8.1.8, Copyright (c), by Zend Technologies                                                                                                                         
- 
-# apt install php5.6                     
-Reading package lists... Done                                                                                                                  
-Building dependency tree                                                                    
-Reading state information... Done                                                           
-The following package was automatically installed and is no longer required:          
-  php7.3-mysql                                                                                           
-Use 'apt autoremove' to remove it.                                                                           
-The following additional packages will be installed:                                                                 
-  libapache2-mod-php5.6 php5.6-cli php5.6-common php5.6-json php5.6-opcache php5.6-readline                                          
-The following NEW packages will be installed:                                                                                                                                           
-  libapache2-mod-php5.6 php5.6 php5.6-cli php5.6-common php5.6-json php5.6-opcache php5.6-readline                                
-0 upgraded, 7 newly installed, 0 to remove and 1 not upgraded.                                                                     
-Need to get 3,662 kB of archives.                                                                                                                                                         
-After this operation, 14.2 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 php5.6-common amd64 5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd [736 kB]                                                          
-Get:2 https://packages.sury.org/php buster/main amd64 php5.6-json amd64 5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd [17.9 kB]                                                            
-Get:3 https://packages.sury.org/php buster/main amd64 php5.6-opcache amd64 5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd [63.0 kB]                                                         
-Get:4 https://packages.sury.org/php buster/main amd64 php5.6-readline amd64 5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd [13.0 kB] 
-Get:5 https://packages.sury.org/php buster/main amd64 php5.6-cli amd64 5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd [1,303 kB] 
-Get:6 https://packages.sury.org/php buster/main amd64 libapache2-mod-php5.6 amd64 5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd [1,260 kB] 
-Get:7 https://packages.sury.org/php buster/main amd64 php5.6 all 5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd [268 kB] 
-Fetched 3,662 kB in 0s (7,763 kB/s) 
-Selecting previously unselected package php5.6-common. 
-(Reading database ... 220795 files and directories currently installed.) 
-Preparing to unpack .../0-php5.6-common_5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd_amd64.deb ... 
-Unpacking php5.6-common (5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd) ... 
-Selecting previously unselected package php5.6-json. 
-Preparing to unpack .../1-php5.6-json_5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd_amd64.deb ... 
-Unpacking php5.6-json (5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd) ... 
-... 
-Creating config file /etc/php/5.6/mods-available/opcache.ini with new version 
-Setting up php5.6-readline (5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd) ... 
- 
-Creating config file /etc/php/5.6/mods-available/readline.ini with new version 
-Setting up php5.6-cli (5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd) ... 
- 
-Creating config file /etc/php/5.6/cli/php.ini with new version 
-Setting up libapache2-mod-php5.6 (5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd) ... 
- 
-Creating config file /etc/php/5.6/apache2/php.ini with new version 
-libapache2-mod-php5.6: php5 module already enabled, not enabling PHP 5.6 
-Setting up php5.6 (5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd) ... 
-Processing triggers for man-db (2.8.5-2) ... 
-Processing triggers for php5.6-cli (5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd) ... 
-Processing triggers for libapache2-mod-php5.6 (5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd) ... 
- 
-# update-alternatives --set php /usr/bin/php5.6 
-update-alternatives: using /usr/bin/php5.6 to provide /usr/bin/php (php) in manual mode 
- 
-# 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 
-</file> 
- 
- 
-==== Fix Bumblebee problems ==== 
- 
-El programa Bumblebee (servidor de reserves) dóna diversos errors. 
- 
-<file> 
-# tail /var/log/apache2/error.log 
-[Sun Aug 07 12:20:40.886047 2022] [:error] [pid 15212] [client 158.109.48.53:59698] PHP Fatal error:  Call to undefined function mb_detect_encoding() in /opt/bmbee-117/system-inc/php-gettext 
-/gettext.inc on line 102, referer: http://sermn.uab.cat/wiki/doku.php 
-[Sun Aug 07 12:47:46.637033 2022] [:error] [pid 15210] [client 66.249.65.129:56948] PHP Fatal error:  Call to undefined function mb_detect_encoding() in /opt/bmbee-117/system-inc/php-gettext 
-/gettext.inc on line 102 
-</file> 
- 
-Una consulta a Google indica que [[https://stackoverflow.com/questions/17204437/fatal-error-call-to-undefined-function-mb-detect-encoding | aquest error es deu a que no s'ha instal·lat l'extensió de PHP //mbstring//]] (que no s'instal·la per defecte). Instal·lo l'extensió, reinicio el servidor apache, 
- 
-<file> 
-# apt search php5* | grep mbstring 
- 
-WARNING: apt does not have a stable CLI interface. Use with caution in scripts. 
- 
-php-mbstring/buster,now 2:8.1+92+0~20220117.43+debian10~1.gbpe0d14e all [installed,automatic] 
-php5.6-mbstring/buster 5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd amd64 
-php5.6-mbstring-dbgsym/buster 5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd amd64 
-  debug symbols for php5.6-mbstring 
-... 
- 
-# apt install php5.6-mbstring 
-Reading package lists... Done 
-Building dependency tree 
-Reading state information... Done 
-The following NEW packages will be installed: 
-  php5.6-mbstring 
-0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 
-Need to get 468 kB of archives. 
-After this operation, 1,514 kB of additional disk space will be used. 
-Get:1 https://packages.sury.org/php buster/main amd64 php5.6-mbstring amd64 5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd [468 kB] 
-Fetched 468 kB in 0s (2,757 kB/s)    
-Selecting previously unselected package php5.6-mbstring. 
-(Reading database ... 226308 files and directories currently installed.) 
-Preparing to unpack .../php5.6-mbstring_5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd_amd64.deb ... 
-Unpacking php5.6-mbstring (5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd) ... 
-Setting up php5.6-mbstring (5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd) ... 
- 
-Creating config file /etc/php/5.6/mods-available/mbstring.ini with new version 
-Processing triggers for libapache2-mod-php5.6 (5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd) ... 
-Processing triggers for php5.6-cli (5.6.40-60+0~20220627.67+debian10~1.gbp1f7ffd) ... 
- 
-# apache2ctl restart 
-</file> 
- 
-i el problema sembla haver-se resolt, però quan intento crear una reserva surt un nou missatge d'error, 
- 
-<file> 
-2022-08-07 11:47:50 15798 [Warning] Aborted connection 15798 to db: 'bmbdb117' user: 'sermnadmin' host: 'localhost' (Got timeout reading communication packets) 
-</file> 
- 
-Una cerca a Google indica que [[https://dba.stackexchange.com/questions/205398/mysql-got-timeout-reading-communication-packets-when-reading-federated-table | aquest error està relacionat amb la variable "wait_timeout",]] que té un valor per defecte de 40 segons que podria ser insuficient en el nostre cas. 
- 
-La solució és assignar un nou valor a aquesta variable a la secció ''[mysqld]'' del fitxer de configuració, 
- 
-<file> 
-# /etc/mysql/mariadb.conf.d 
-# cp 50-server.cnf 50-server.cnf.BKUP-20220807 
-# vi 50-server.cnf 
-</file> 
- 
-i afegir les línies 
- 
-<code diff> 
-# diff 50-server.cnf 50-server.cnf.BKUP-20220807 
-45,53d44 
-< # * Local Tuning - MCE - 20220807 
-< # 
-< # MySQL Got timeout reading communication packets when reading federated table 
-< # https://dba.stackexchange.com/questions/205398/mysql-got-timeout-reading-communication-packets-when-reading-federated-table 
-< # 
-< wait_timeout=3600       # from 40 seconds may reduce handler_rollback count 
-< 
-< 
-< # 
-73,77c64,68 
-< slow_query_log_file    = /var/log/mysql/mariadb-slow.log 
-< long_query_time        = 10 
-< log_slow_rate_limit    = 1000 
-< log_slow_verbosity     = query_plan 
-< log-queries-not-using-indexes 
---- 
-> #slow_query_log_file    = /var/log/mysql/mariadb-slow.log 
-> #long_query_time        = 10 
-> #log_slow_rate_limit    = 1000 
-> #log_slow_verbosity     = query_plan 
-> #log-queries-not-using-indexes 
-</code> 
- 
-Referències: 
- 
-  * [[https://dba.stackexchange.com/questions/205398/mysql-got-timeout-reading-communication-packets-when-reading-federated-table | MySQL Got timeout reading communication packets when reading federated table - Database Administrators Stack Exchange.]]     
-  * [[https://support.cpanel.net/hc/en-us/articles/1500012855541-MySQL-error-log-says-Got-timeout-reading-communication-packets- | MySQL error log says "Got timeout reading communication packets" ? cPanel]] 
-  * [[https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_wait_timeout | MySQL :: MySQL 8.0 Reference Manual :: 5.1.8 Server System Variables.]] 
- 
-Amb aquest canvi, desapareix aquest error, però llavors apareix un de nou, 
- 
-<file> 
-[Sun Aug 07 16:04:47.456947 2022] [:error] [pid 25390] [client 158.109.48.53:60540] PHP Fatal error:  Call to undefined function T_() in /opt/bmbee-117/inc/db.php on line 46, referer: http:/ 
-/sermn.uab.cat/reserves/index.php?action=book 
-[Sun Aug 07 16:04:55.344007 2022] [:error] [pid 25403] [client 158.109.48.53:60544] PHP Fatal error:  Call to undefined function T_() in /opt/bmbee-117/inc/db.php on line 46, referer: http:/ 
-/sermn.uab.cat/reserves/index.php?action=book 
-</file> 
- 
-que sembla indicar que hi ha un problema d'accés a la base de dades, però des de la línia de comandes em puc connectar: 
- 
-<file> 
-# mariadb bmbdb117 -u sermnadmin -p  
-Enter password: 
-Reading table information for completion of table and column names 
-You can turn off this feature to get a quicker startup with -A 
- 
-Welcome to the MariaDB monitor.  Commands end with ; or \g. 
-Your MariaDB connection id is 670 
-Server version: 10.3.34-MariaDB-0+deb10u1 Debian 10 
- 
-Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. 
- 
-Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 
- 
-MariaDB [bmbdb117]> show tables; 
-+---------------------------+ 
-| Tables_in_bmbdb117        | 
-+---------------------------+ 
-| ACTIVE_USERS              | 
-| bookings                  | 
-| consumables               | 
-| consumables_use           | 
-| costs                     | 
-| groups                    | 
-| instrumentclass           | 
-| instruments               | 
-| permissions               | 
-| permissions.BKUP-20210517 | 
-| permissions.BKUP-20210607 | 
-| permissions.BKUP-20211215 | 
-| projectgroups             | 
-| projectrates              | 
-| projects                  | 
-| roleusers                 | 
-| userclass                 | 
-| usergroups                | 
-| userprojects              | 
-| users                     | 
-| users.BKUP-20210914       | 
-+---------------------------+ 
-21 rows in set (0.000 sec) 
- 
-MariaDB [bmbdb117]> describe bookings ; 
-+------------+----------------------+------+-----+---------+----------------+ 
-| Field      | Type                 | Null | Key | Default | Extra          | 
-+------------+----------------------+------+-----+---------+----------------+ 
-| id         | int(10) unsigned     | NO   | PRI | NULL    | auto_increment | 
-| bookwhen   | datetime             | NO       | NULL    |                | 
-| duration   | time                 | NO       | NULL    |                | 
-| instrument | smallint(5) unsigned | NO       | NULL    |                | 
-| bookedby   | smallint(5) unsigned | NO       | NULL    |                | 
-| userid     | smallint(5) unsigned | NO       | NULL    |                | 
-| projectid  | smallint(5) unsigned | NO       | NULL    |                | 
-| discount   | float                | YES  |     | 0                      | 
-| ip         | char(16)             | YES  |     | NULL    |                | 
-| comments   | text                 | YES  |     | NULL    |                | 
-| log        | text                 | YES  |     | NULL    |                | 
-| deleted    | tinyint(1)           | YES  |     | 0                      | 
-+------------+----------------------+------+-----+---------+----------------+ 
-12 rows in set (0.001 sec) 
- 
-MariaDB [bmbdb117]> quit; 
-Bye 
-</file> 
- 
-Per eliminar l'error associat a la funció "T_(", l'elimino provisionalment del codi, 
- 
-<code diff> 
-# diff db.php db.php.BKUP-20220807 
-46c46 
-<   $errmsg  = sprintf(('<p>Sorry, I couldn\'t connect to the database, so there\'s nothing I can presently do. This could be due to a booking system misconfiguration, or a failure of the da 
-tabase subsystem.</p><p>If this persists, please contact the <a href="mailto:%s">booking system administrator</a>.</p>'), $conf->AdminEmail); 
---- 
->   $errmsg  = sprintf(T_('<p>Sorry, I couldn\'t connect to the database, so there\'s nothing I can presently do. This could be due to a booking system misconfiguration, or a failure of the  
-database subsystem.</p><p>If this persists, please contact the <a href="mailto:%s">booking system administrator</a>.</p>'), $conf->AdminEmail); 
-</code> 
- 
-intento crear una reserva sense èxit, i comprovo el missatge d'error al registre de MariaDB: 
- 
-<file> 
-2022-08-07 18:36:08 590 [Warning] Aborted connection 590 to db: 'bmbdb117' user: 'sermnadmin' host: 'localhost' (Got an error reading communication packets) 
-</file> 
- 
-Una consulta a Google indica que [[https://www.percona.com/blog/2016/05/16/mysql-got-an-error-reading-communication-packet-errors/ | aquest error té relació amb la variable [[https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_max_allowed_packet | max_allowed_packet]]. 
- 
-Per intentar resoldre l'error, incremento el valor de la variable, 
- 
-<code diff> 
-# diff 50-server.cnf 50-server.cnf.BKUP-20220807 
-34c34 
-< max_allowed_packet     = 64M 
---- 
-> #max_allowed_packet     = 16M 
-45,53d44 
-< # * Local Tuning - MCE - 20220807 
-< # 
-< # MySQL Got timeout reading communication packets when reading federated table 
-< # https://dba.stackexchange.com/questions/205398/mysql-got-timeout-reading-communication-packets-when-reading-federated-table 
-< # 
-< wait_timeout=3600       # from 40 seconds may reduce handler_rollback count 
-< 
-< 
-< # 
-73,77c64,68 
-< slow_query_log_file    = /var/log/mysql/mariadb-slow.log 
-< long_query_time        = 10 
-< log_slow_rate_limit    = 1000 
-< log_slow_verbosity     = query_plan 
-< log-queries-not-using-indexes 
---- 
-> #slow_query_log_file    = /var/log/mysql/mariadb-slow.log 
-> #long_query_time        = 10 
-> #log_slow_rate_limit    = 1000 
-> #log_slow_verbosity     = query_plan 
-> #log-queries-not-using-indexes 
-</code> 
- 
-Però el problema persisteix. 
- 
-Finalment, després d'activar les opcions per mostrar les comandes SQL i altres avisos i errors al programa de reserves: 
- 
-<code php> 
-[error_handling] 
-; Browser error stream: 
-; Set these to 0 for production systems, 1 for development/debugging 
-; Show all SQL statements in the browser 
-; VerboseSQL = 0 
-VerboseSQL = 1 
-; Show all PHP warnings (such as uninitialised variables) 
-AllWarnings = 1 
-; Show a warning if install folder still is in the server location 
-ignore_installer = 1 
-; Show all GET and POST data provided by the browser 
-; VerboseData = 0 
-VerboseData = 0 
-; Use the dBug class from http://dbug.ospinto.com/ to pretty print error 
-; and debug output (designed for developer use only; you need to put dBug.php 
-; somewhere in your include path for this to work). 
-UseDBug = 0 
-</code> 
- 
-aconsegueixo veure que l'error està relacionat amb una configuració més estricta de MariaDB respecte versions anteriors, configuració que no és compatible amb la versió actual del programa. Després de provar a modificar la configuració del gestor de la base de dades sense èxit, 
- 
-  * [[https://mariadb.com/kb/en/sql-mode/ | MariaDB - SQL_MODE]] 
-  * [[https://mariadb.com/kb/en/old-mode/ | MariaDB - OLD_MODE]] 
- 
-trobo que la forma més fàcil de resoldre **provisionalment** el problema, és fer ús de l'opció [[https://mariadb.com/kb/en/ignore/ | IGNORE]] a la comanda INSERT de forma que, 
- 
-<blockquote> 
-Normally INSERT stops and rolls back when it encounters an error. 
- 
-By using the IGNORE keyword all errors are converted to warnings, which will not stop inserts of additional rows. 
- 
-The IGNORE and DELAYED options are ignored when you use ON DUPLICATE KEY UPDATE. 
- 
-Prior to MySQL and MariaDB 5.5.28, no warnings were issued for duplicate key errors when using IGNORE. You can get the old behavior if you set OLD_MODE to NO_DUP_KEY_WARNINGS_WITH_IGNORE. 
-<cite> 
-([[https://mariadb.com/kb/en/insert-ignore/ | INSERT IGNORE]]) 
-</cite> 
-</blockquote> 
- 
-Per això cal modificar el fitxer ''/opt/bmbee-117/inc/formslib/dbrow.php'', 
- 
-<code diff> 
-# diff dbrow.php dbrow.php.BKUP-20220807 
-252c252 
-<         $q = 'INSERT IGNORE INTO '.$conf->value('database', 'tableprefix').$this->table.' SET '.$vals; 
---- 
->         $q = 'INSERT '.$conf->value('database', 'tableprefix').$this->table.' SET '.$vals; 
-</code> 
- 
-Després de fer el canvi, comprovo que es poden crear reserves i un nou compte d'usuari, i assumeixo que la resta de comandes ''INSERT'' també funcionaran correctament. 
- 
-==== [PENDENT] Install phpmyadmin ==== 
- 
-<WRAP important> 
-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. 
-</WRAP> 
- 
- 
-<file> 
-# 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) ... 
-</file> 
- 
-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, 
- 
-<file> 
-# 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 
-</file> 
- 
-i desinstal·lo la versió 7.0 perquè ja hi ha instal·lada una versió de PHP 7 més actual, 
- 
-<file> 
-# 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. 
-</file> 
- 
-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, 
- 
-<file> 
-# 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... 
-</file> 
- 
-i comprovo que els corresponents serveis s'hagin aturat, 
- 
-<file> 
-# 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. 
-</file> 
- 
-Tot seguit desactivo altres mòduls d'Apache que s'havien activat 
- 
-<file> 
-# 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 
-</file> 
- 
-Finalment, reinicio Apache per aplicar els canvis: 
- 
-<file> 
-# apache2ctl configtest 
-Syntax OK 
-# systemctl restart apache2 
-</file> 
  
  
Line 1522: Line 832:
   * [[https://linuxize.com/post/how-to-show-databases-in-mysql/ | How to Show a List of All Databases in MySQL,]] Linuxize.   * [[https://linuxize.com/post/how-to-show-databases-in-mysql/ | How to Show a List of All Databases in MySQL,]] Linuxize.
  
- +<WRAP box > 
 +**Continuació:** [[informatica:servidor_internet_2009_debian_10_part_2 | Actualització a Debian 10.12 - Part 2]] 
 +</WRAP>
informatica/servidor_internet_2009_debian_10_part_1.1660055828.txt.gz · Last modified: 2022/08/09 16:37 by miquel