Tuesday, March 11, 2008

Installing MySQL and PHP4 with apache1.3

Continued from previous post

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
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 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

Install Apache with modssl from source

copy and paste the following into a new file then chmod it to 755

cd /usr/src
wget http://www.openssl.org/source/openssl-0.9.8g.tar.gz
tar xzvf openssl-0.9.8g.tar.gz
cd openssl-0.9.8g
read -p "If ./config finished press enter to make"
read -p "If make finished press enter to make install"
make install
read -p "If make install finished press enter to install apache and modssl "

wget http://archive.apache.org/dist/httpd/apache_1.3.41.tar.gz
tar zxvf apache_1.3.41.tar.gz
wget http://www.modssl.org/source/mod_ssl-2.8.31-1.3.41.tar.gz
tar xzvf mod_ssl-2.8.31-1.3.41.tar.gz
cd mod_ssl-2.8.31-1.3.41
./configure --with-apache=../apache_1.3.41 \
 --with-ssl=../openssl-0.9.8g \
 --prefix=/usr/local/apache \
read -p "If ./configure finished press enter to make"
cd ../apache_1.3.41
read -p "If make finished press enter to make install"
make certificate
make install