How To Install MySQL 4.1 And PHP4 On Debian Etch
How To Install MySQL 4.1 And PHP4 On Debian EtchVersion 1.0 MySQL 4 and PHP 4 are quite old, but you might have PHP applications on your server that require PHP4 and MySQL 4. The problem is that Debian Etch comes with MySQL 5 only, and its PHP4 packages depend on MySQL 5 and don't work with MySQL 4. This guide shows how you can install MySQL 4.1 on Debian Etch along with PHP4 packages that work with MySQL 4.1. I do not issue any guarantee that this will work for you!
1 Preliminary NoteThe Debian Etch system that I'm using here has the IP address 192.168.0.100.
2 Configure aptFortunately http://debian.mytso.net/etch has Debian packages for MySQL 4.1 and PHP4. To use these, we must open /etc/apt/sources.list and add the following line to it: vi /etc/apt/sources.list
Next we open /etc/apt/preferences and specify that apt should use the debian.mytso.net repository with priority over the default Debian repositories: vi /etc/apt/preferences
The priority 1001 makes sure that the debian.mytso.net is the preferred repository. Now we update our packages database: apt-get update
3 Install MySQL 4.1In order to install MySQL 4.1, we simply run the following command: apt-get install mysql-server-4.1 mysql-client-4.1 mysql-common-4.1 libmysqlclient14 libmysqlclient14-dev To configure MySQL and set up passwords, take a look at chapter 10 on http://www.howtoforge.com/perfect_setup_debian_etch_p4.
4 Install Apache2 With PHP4To install Apache2 with PHP4 (with support for MySQL 4.1), we simply run: apt-get install libapache2-mod-php4 php4-common php4-curl php4-domxml php4-gd php4-imap php4-mcal php4-mcrypt php4-mhash php4-mysql php4-pspell php4-recode php4-snmp php4-xslt php4 You might see the following question during the installation: Continue installing libc-client without Maildir support? <-- Yes Afterwards, restart Apache: /etc/init.d/apache2 restart
5 Test PHP4Now we can test if PHP4 and MySQL 4.1 are properly installed. Assuming that your default Apache document root is /var/www (which is true for a default Apache installation on Debian), we create the PHP file /var/www/info.php: vi /var/www/info.php
Then we call the file in a browser (http://192.168.0.100/info.php). If all goes well, you should see that you have PHP4 installed (4.4.4 in this example)... ... and that MySQL support is enabled in PHP4. The Client API version is 4.1.11 which is good because we installed MySQL 4.1.11:
6 Old Passwords (MySQL)If you're having problems logging into your web applications, open /etc/mysql/my.cnf and add old-passwords to the [mysqld] stanza, like this: vi /etc/mysql/my.cnf
Restart MySQL afterwards: /etc/init.d/mysql restart
7 Links
|
www.seamlessenterprise.com
One number. One voicemail. Seize the lead. Sprint Mobile Integration.
www.seamlessenterprise.com
One Number. One Voicemail.
Make it easier for clients to reach you. Turn your desk phone and mobile phone into one with Sprint Mobile Integration.
www.seamlessenterprise.com
One number. One voicemail. Sprint Mobile Integration.
www.seamlessenterprise.com
AT&T Synaptic Compute as a Service. Boost your power on demand.
Trial: IBM Cognos Express Reporting, Analysis & Planning
Learn benefits of Simpana software.
View the Gartner Video









Recent comments
22 hours 14 min ago
22 hours 59 min ago
1 day 49 min ago
1 day 1 hour ago
1 day 3 hours ago
1 day 12 hours ago
1 day 12 hours ago
1 day 14 hours ago
1 day 16 hours ago
1 day 17 hours ago