Tuesday, March 11, 2008

Installing MySQL and PHP4 with apache1.3

Continued from previous post

#!/bin/bash
cd /usr/src

wget  http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.51a.tar.gz/from/http://mysql.mirror.rafal.ca/
tar xzvf mysql-5.0.51a.tar.gz
cd mysql-5.0.51a
groupadd mysql
useradd -g mysql mysql
./configure
make
make install
cp support-files/my-small.cnf /etc/my.cnf
cd /usr/local/mysql
chown -R mysql .
chgrp -R mysql .
bin/mysql_install_db --user=mysql
chown -R root .
chown -R mysql var
bin/mysqld_safe --user=mysql &

wget http://ca3.php.net/get/php-4.4.8.tar.gz/from/ca.php.net/mirror
tar zxvf php-4.4.8.tar.gz
cd php-4.4.8
#assumes apache was configure as DSO
./configure --with-apxs=/usr/local/apache/bin/apxs
make
make install
Review /usr/local/apache/conf/httpd.conf LoadModule php4_module libexec/libphp4.so should already be in the config file Add or verify Addtype application/x-httpd-php .php Addtype application/x-httpd-php-source .phps

No comments: