[ale] MySQL 4 & PHP on Redhat Enterprise Linux?

Jonathan Glass jonathan.glass at ibb.gatech.edu
Tue Jul 20 13:42:34 EDT 2004


On Tue, 2004-07-20 at 11:51, George Carless wrote:
> Hi all,
> 
> Does anyone have any experience with getting mysql 4.0 (or above) installed on a redhat 
> enterprise linux box?  My opinion is that RHEL is a waste of money, but since it's a 'done 
> deal' by our IT department I don't have much choice but to try to get 4 running on our server.  
> Installing the RPM was easy enough, but I'm having a tough time getting mysql support in PHP 
> (which is, I believe, provided by the php-mysql package.. but redhat's php-mysql package wants 
> mysql 3.. )
> 
> I'd compile from scratch but, again, this is IT's box and they want to have everything 
> RPMified.. why RedHat don't go beyond mysql 3 is quite baffling..
> 
> Any help much appreciated!
> 
> --George

A little more work than Keith's suggestions...

[root at bilbo root]# rpm -qa | grep -i mysql
perl-DBD-MySQL-2.1021-3
mysql-3.23.58-1
MySQL-python-0.9.1-6
mysql-server-3.23.58-1
mysql-devel-3.23.58-1
libdbi-dbd-mysql-0.6.5-5
mod_auth_mysql-20030510-1.ent
qt-MySQL-3.1.2-13
php-mysql-4.3.2-11.ent
[root at bilbo root]# rpm -e mysql mysql-server mysql-devel MySQL-python MyODBC qt-MySQL libdbi-dbd-mysql perl-DBD-MySQL php-mysql mod_auth_mysql

Download the following packages
MySQL-client-4.0.20-0.i386.rpm  MySQL-shared-compat-4.0.20-0.i386.rpm
MySQL-devel-4.0.20-0.i386.rpm   php-4.3.2-8.ent.src.rpm
MySQL-server-4.0.20-0.i386.rpm

Install MySQL 4.0
[root at bilbo SRPMS]# rpm -ivh MySQL-*
warning: MySQL-client-4.0.20-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f 5
Preparing...                ########################################### [100%]
   1:MySQL-shared-compat    ########################################### [ 25%]
   2:MySQL-client           ########################################### [ 50%]
   3:MySQL-devel            ########################################### [ 75%]
   4:MySQL-server           ########################################### [100%]
Installing all prepared tables
040720 13:27:28  Warning: Asked for 196608 thread stack, but got 126976
040720 13:27:28  /usr/sbin/mysqld: Shutdown Complete
 
 
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h bilbo.ibb.gatech.edu 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


Rebuild PHP -> but first, satisfy dependencies:
[root at bilbo SRPMS]# rpmbuild --rebuild php-4.3.2-8.ent.src.rpm
Installing php-4.3.2-8.ent.src.rpm
cat: /usr/include/httpd/.mmn: No such file or directory
error: Failed build dependencies:
        freetype-devel is needed by php-4.3.2-8.ent
        gd-devel >= 1.8.4 is needed by php-4.3.2-8.ent
        httpd-devel >= 2.0.40-6 is needed by php-4.3.2-8.ent
        libjpeg-devel is needed by php-4.3.2-8.ent
        libpng-devel is needed by php-4.3.2-8.ent
        pcre-devel is needed by php-4.3.2-8.ent
        imap-devel is needed by php-4.3.2-8.ent
        unixODBC-devel is needed by php-4.3.2-8.ent
[root at bilbo SRPMS]# up2date-nox -u freetype-devel gd-devel httpd-devel libjpeg-devel libpng-dev el pcre-devel imap-devel unixODBC-devel
 
Fetching package list for channel: rhel-i386-as-3...
########################################
 
Fetching package list for channel: rhel-i386-as-3-extras...
########################################
 
Fetching package list for channel: rhel-i386-as-3-cluster...
########################################
 
Fetching Obsoletes list for channel: rhel-i386-as-3...
 
Fetching Obsoletes list for channel: rhel-i386-as-3-extras...
 
Fetching Obsoletes list for channel: rhel-i386-as-3-cluster...
 
Fetching rpm headers...
########################################
 
Name                                    Version        Rel
----------------------------------------------------------
freetype-devel                          2.1.4          4.0               i386
gd-devel                                1.8.4          12                i386
httpd-devel                             2.0.46         32.ent.3          i386
imap-devel                              2002d          8                 i386
libjpeg-devel                           6b             30                i386
libpng-devel                            1.2.2          24                i386
pcre-devel                              3.9            10                i386
unixODBC-devel                          2.2.8          2.3.0.2           i386
 
 
Testing package set / solving RPM inter-dependencies...
########################################
freetype-devel              ########################## Done.
gd-devel-1.8.4-12.i386.rpm: ########################## Done.
httpd-devel-2.0.46-32.ent.3 ########################## Done.
imap-devel-2002d-8.i386.rpm ########################## Done.
libjpeg-devel-6b-30.i386.rp ########################## Done.
libpng-devel-1.2.2-24.i386. ########################## Done.
pcre-devel-3.9-10.i386.rpm: ########################## Done.
unixODBC-devel-2.2.8-2.3.0. ########################## Done.
Preparing              ########################################### [100%]
 
Installing...
   1:unixODBC-devel         ########################################### [100%]
   2:gd-devel               ########################################### [100%]
   3:httpd-devel            ########################################### [100%]
   4:imap-devel             ########################################### [100%]
   5:libjpeg-devel          ########################################### [100%]
   6:libpng-devel           ########################################### [100%]
   7:pcre-devel             ########################################### [100%]

Get rid of the old PHP install:
[root at bilbo SRPMS]# rpm -e php php-ldap php-odbc php-imap squirrelmail

Install new RPMS
[root at bilbo SRPMS]# rpm -ivh /usr/src/redhat/RPMS/i386/php-*
Preparing...                ########################################### [100%]
   1:php                    ########################################### [ 14%]
   2:php-debuginfo          ########################################### [ 29%]
   3:php-imap               ########################################### [ 43%]
   4:php-ldap               ########################################### [ 57%]
   5:php-mysql              ########################################### [ 71%]
   6:php-odbc               ########################################### [ 86%]
   7:php-pgsql              ########################################### [100%]

Start MySQL
[root at bilbo html]# service mysql start
[root at bilbo html]# mysql --version
mysql  Ver 12.22 Distrib 4.0.20, for pc-linux (i686)

Voila!  PHP4.3.2 + MySQL 4.0.20 + Apache 2.0.46

Jonathan Glass



More information about the Ale mailing list