Installation
of Apache+MySql+PHP and html2ps in RedHat Linux
# rpm -qa | grep httpd
# rpm -e httpd-2.0.40-21
# rpm -e redhat-config-httpd-1.0.1-18
# rpm -e httpd-2.0.40-21
# rpm -i perl-DBI-1.32-5.i386.rpm
# rpm -i perl-DBD-1.32-5.i386.rpm
# rpm -i perl-CGI-2.81-88.i386.rpm
# rpm -i perl-DBD-MySQL-2.1021-3.i386.rpm
# rpm --install mysql-server-3.23.54a-11.i386.rpm
# rpm -i php-mysql-4.2.2-17.i386.rpm
#/etc/rc.d/init.d/mysqld start
# /usr/bin/mysqladmin -u root password 'subhasis'
# gunzip apache_1.3.28.tar.Z
# tar -xvf apache_1.3.28.tar
# cd apache_1.3.28
# ./configure --prefix=/var/www
# cd ../ ..
# cd php
# gunzip php-4.3.2.tar.gz
# tar -xvf php-4.3.2.tar
# cd php-4.3.2
# ./configure --with-mysql --with-xml --enable-track-vars
--with-apache=../../apache/apache_1.3.228
# make
# make install
# cd ..
# cd apache/
# cd apache_1.3.28
# ./configure --prefix=/var/www --enable-module=rewrite --activate-module=src/modules/php4/libphp4.a
# make
# make install
#cp php.ini-dist /usr/local/lib/php.ini
# vi /usr/local/lib/php.ini -- Change settings if required. (default is
okay in most cases)
The following three has to be installed. If they are not, please install them
from the RPMS in the CD.
# rpm -qa | grep libwww
# rpm -qa | grep Image
# rpm -qa | grep
# gunzip html2ps-1.0b3.tar.gz
#tar -xvf html2ps-1.0b3.tar
# cd html2ps-1.0b3
# ./install
Create a file httpd with the following script in it:
#!/bin/bash
#
datadir="/var/www/bin"
#echo $1
# See how we were called.
case "$1" in
start)
$datadir/apachectl start
;;
stop)
$datadir/apachectl stop
;;
restart)
$datadir/apachectl restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
Create the following link in /etc/rc5.d/ : ln -s /etc/rc.d/init.d/httpd S15httpd,
to ensure the strting of the web server during the server's startup.