User Tools

Site Tools


blankserver:woody

Woody est installé sur la machine depuis fin 2001 (disque /dev/hda de 20 Go), alors que woody était toujours en testing. Il y a actuellement un noyau 2.4.18.

Partitions:

        Name                    Flags                 Part Type            FS Type                         [Label]                     Size (MB)
  ----------------------------------------------------------------------------------------------------------------------------------------------------------
       hda1                Boot                   Primary            Linux ext2                                                        24.68
       hda2                                           Primary            Linux swap                                                    139.83
       hda3                                           Primary            Linux ext2                                                    4342.95
       hda5                                           Logical             Linux ext2                                                    3997.49
       hda6                                           Logical             Linux ext2                                                    3997.49
       hda7                                           Logical             Linux ext2                                                    7978.53

hda1: /boot hda2: swap hda3: /usr hda5: /var hda6: /home hda7: /

Il y avait aussi mon vieux disque dur windows (maintenant, c'est Sarge).

 mount -r -t ntfs /dev/hdd5 /home/carl/mnt/ 

Il y a un webserver Apache qui tourne (sur lequel ce wackowiki était précédemment installé) et un dhcp pour le réseau filaire (udhcpd).

C'est aussi un noeud ReseauCitoyen (mais je dois encore installer aodv-uu).

Il y a une faille de sécurité dans PHP4, et vu que la version dans woody n'est plus maintenue upstream, je suis passé à la version 4.3.10 grâce au backport de http://www.dotdeb.org/.

J'en ai profité pour passer à MySQL 4, mais j'avais des problèmes avec l'identifiant de WackoR4 qui sautait tout seul vers un autre identifiant sans nom (tous les champs à blanc).

J'ai donc dû faire marche arrière, ce qui m'a posé quelques problèmes. Voici ce que j'ai fait: Liste des paquets venant du backport de Dotdeb:

 Desired=Unknown/Install/Remove/Purge/HoldFatal error: Call to undefined function: mysql_pconnect() in /var/www/bookmarker/lib/phplib/db_mysql.inc on line 73
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                              Version                           Description
+++-=================================-=================================-==================================================================================
ii  apache         1.3.26-0.dotde Versatile, high-performance HTTP server
ii  apache-common  1.3.26-0.dotde Support files for all Apache webservers
ii  libapache-mod- 4.3.10-1.dotde server-side, HTML-embedded scripting language
ii  libdbd-mysql-p 2.9004-0.dotde A Perl5 database interface to the MySQL data
ii  libmysqlclient 4.1.7-1.dotdeb mysql database client library
ii  libxml2        2.6.7-1.dotdeb GNOME XML library
ii  mysql-client   4.1.7-1.dotdeb mysql database client binaries
ii  mysql-common   4.1.7-1.dotdeb mysql database common files (e.g. /etc/mysql
ii  mysql-server   4.1.7-1.dotdeb mysql database server binaries
ii  php4           4.3.10-1.dotde server-side, HTML-embedded scripting languag
ii  php4-cli       4.3.10-1.dotde command-line interpreter for the php4 script
ii  php4-common    4.3.10-1.dotde Common files for packages built from the php
ii  php4-gd        4.3.10-1.dotde GD module for php4
ii  php4-mysql     4.3.10-1.dotde MySQL module for php4
ii  php4-pear      4.3.10-1.dotde PEAR - PHP Extension and Application Reposit

root@callendor:/var/www/bookmarker/lib/phplib# apt-get remove libmysqlclient14
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
  bookmarker libdbd-mysql-perl libmysqlclient14 mysql-client mysql-server php4-mysql phpmyadmin
0 packages upgraded, 0 newly installed, 7 to remove and 0  not upgraded.
Need to get 0B of archives. After unpacking 44.3MB will be freed.

root@callendor:/var/www/bookmarker/lib/phplib# apt-get install mysql-common/stable mysql-server/stable mysql-client/stable
Reading Package Lists... Done
Building Dependency Tree... Done
Selected version 3.23.49-8.8 (Debian:3.0r3/stable, Debian-Security:3.0/stable) for mysql-common
Selected version 3.23.49-8.8 (Debian:3.0r3/stable, Debian-Security:3.0/stable) for mysql-server
Selected version 3.23.49-8.8 (Debian:3.0r3/stable, Debian-Security:3.0/stable) for mysql-client
The following extra packages will be installed:
  libdbd-mysql-perl libmysqlclient14 mysql-client mysql-common mysql-server
The following NEW packages will be installed:
  libdbd-mysql-perl libmysqlclient14 mysql-client mysql-server
The following packages will be DOWNGRADED
  mysql-common
0 packages upgraded, 4 newly installed, 1 downgraded, 0 to remove and 0  not upgraded.
Need to get 0B/4416kB of archives. After unpacking 11.2MB will be used.
Do you want to continue? [Y/n]
Preconfiguring packages ...
dpkg - warning: downgrading mysql-common from 4.1.7-1.dotdeb.0 to 3.23.49-8.8.
(Reading database ... 75167 files and directories currently installed.)
Preparing to replace mysql-common 4.1.7-1.dotdeb.0 (using .../mysql-common_3.23.49-8.8_all.deb) ...
Unpacking replacement mysql-common ...
Selecting previously deselected package libmysqlclient14.
Unpacking libmysqlclient14 (from .../libmysqlclient14_4.1.7-1.dotdeb.0_i386.deb) ...
Selecting previously deselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_2.9004-0.dotdeb.0_i386.deb) ...
Selecting previously deselected package mysql-client.
Unpacking mysql-client (from .../mysql-client_3.23.49-8.8_i386.deb) ...
Selecting previously deselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_3.23.49-8.8_i386.deb) ...
Setting up mysql-common (3.23.49-8.8) ...
Installing new version of config file /etc/mysql/my.cnf ...

Setting up libmysqlclient14 (4.1.7-1.dotdeb.0) ...

Setting up libdbd-mysql-perl (2.9004-0.dotdeb.0) ...

Setting up mysql-client (3.23.49-8.8) ...

Setting up mysql-server (3.23.49-8.8) ...
Installing new version of config file /etc/init.d/mysql ...
Installing new version of config file /etc/logrotate.d/mysql-server ...
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld...failed.

root@callendor:/var/www/bookmarker/lib/phplib# less /var/log/mysql/mysql.err
Installing all prepared tables
041224 10:47:18  /usr/sbin/mysqld: Shutdown Complete


PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
/usr/bin/mysqladmin -u root -p password 'new-password'
/usr/bin/mysqladmin -u root -h callendor -p password 'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com

ERROR: 1033  Incorrect information in file: './mysql/user.frm'
ERROR: 1033  Incorrect information in file: './mysql/user.frm'
041224 10:47:18  /usr/sbin/mysqld: Shutdown Complete

041224 10:47:18  mysqld started
041224 10:47:18  /usr/sbin/mysqld: Incorrect information in file: './mysql/user.frm'
041224 10:47:18  mysqld ended

root@callendor:/var/www/bookmarker/lib/phplib# dpkg -S user.frm
dpkg: *user.frm* not found.

root@callendor:/home/carl# mv /var/lib/mysql/mysql/user.frm /var/lib/mysql/mysql/user.frm_old
root@callendor:/home/carl# /etc/init.d/mysql start
Starting MySQL database server: mysqld...failed.
root@callendor:/home/carl# tail /var/log/mysql/mysql.err
041224 12:01:30  mysqld ended

041224 12:01:48  mysqld started
041224 12:01:48  /usr/sbin/mysqld: Incorrect information in file: './mysql/user.frm'
041224 12:01:48  mysqld ended

041224 12:03:00  mysqld started
041224 12:03:00  /usr/sbin/mysqld: Table 'mysql.user' doesn't exist
041224 12:03:00  mysqld ended


root@callendor:/var/lib/mysql# mv mysql/ mysql_old
root@callendor:/var/lib/mysql# mysql_install_db
041224 13:22:45  mysqld started
/usr/sbin/mysqld: ready for connections
root@callendor:/var/lib/mysql# ps ax | grep mysql
10708 pts/1    S      0:00 /bin/sh /usr/bin/safe_mysqld
10743 pts/1    S      0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking
10745 pts/1    S      0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking
10746 pts/1    S      0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking
10747 pts/1    S      0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking
10781 pts/1    S      0:00 grep mysql 

Ensuite, il retrouve les tables, mais pas les users, donc:

 mysql -u root
GRANT ALL PRIVILEGES ON table.* TO user@localhost IDENTIFIED by "password"; 

Pour les applications WackoR4, bookmarker, phpwiki, xoops et type1.

Le lendemain (après le apache restart quotidien je suppose), j'ai l'erreur suivante quand je vais sur le wiki:

Unable to load dynamic library '/usr/lib/php4/20020429/mysql.so'

Solution:

apt-get install php4-mysql

Il vient de http://dotdeb.org/ parce que celui dans stable se plaignait d'une dépendance insatisfaite:

carl@callendor:/var/log/apache$ sudo apt-get install php4-mysql/stable
Reading Package Lists... Done
Building Dependency Tree... Done
Selected version 4:4.1.2-7.0.1 (Debian:3.0r3/stable, Debian-Security:3.0/stable) for php4-mysql
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.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

Sorry, but the following packages have unmet dependencies:
  php4-mysql: Depends: zendapi-20010901
E: Sorry, broken packages

zendapi-20010901 est un package virtuel, php4 ferait l'affaire, mais j'ai installé celui de dotdeb.org (puisque celui de woody a des trous de sécurité), qui lui apparemment ne fait pas l'affaire…

Ça a l'air de fonctionner correctement, mais le problème est qu'alors il faudrait aussi upgrader mysql-common, mysql-server et mysql-client vers les version de dotdeb.org.

Pour éviter cela lors d'une mise à jour, il faut les mettre on hold:

aptitude hold mysql-common mysql-server mysql-client

Et le tour est joué.

Reste que bookmarker ne fonctionne pas:

Fatal error: Call to undefined function: mysql_pconnect() in /var/www/bookmarker/lib/phplib/db_mysql.inc on line 73

Je n'investigue pas plus, je passe à sarge.

J'ai pris du retard sur le planning, donc j'ai trouvé la solution: Dans /etc/apache/php.ini, ajouter la ligne suivante tout en bas:

extension=mysql.so

Redémarrer Apache:

/etc/init.d/apache reload

Probleme backup DB

J'ai rencontré un problème dans phpmyadmin quand je faisais un dump d'une DB:

Allowed memory size of 8388608 bytes exhausted (tried to allocate 4074397 bytes) in /usr/share/phpmyadmin/tbl_dump.php on line 242

Manque de RAM pour le script, il faut changer dans le fichier /etc/php4/apache/php.ini la ligne:

;memory_limit = 8M

en

;memory_limit = 16M

Et faire:

/etc/init.d/apache reload

Et puis c'est bon.

blankserver/woody.txt · Last modified: 2013/01/30 17:49 by 127.0.0.1