extract Apache to /usr/src
extract PHP to /usr/src
extract mysql to /usr/src
Copy extracted mysql to /usr/local/:
cp mysql-number-of-version /usr/local
Create symlink mysql on mysql-number-of-version:
cd /usr/local
ln -s mysql-number-of-version mysql
cd mysql
scripts/mysql_install_db
chown -R root /usr/local/mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql
chown -R root /usr/local/mysql/bin/
bin/safe_mysqld --user=mysql &
x = number of version
cd /usr/src/apache_1.3.x
./configure
cd ../php-4.0.x
./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-vars
make
make install
cd ../apache_1.3.x
./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a
make
make install
cd ../php-4.0.x
cp php.ini-dist /usr/local/lib/php.ini
Edit your httpd.conf in /www/conf/httpd.conf
Delete # before string:
AddType application/x-httpd-php .php
run apache:
/www/bin/apachectl start
NOTE: This is instalation of PHP as static module.
REMEMBER: Try read instructions in INSTALL files under any instalation.