#!/bin/sh # create Apache Web Server # Include: mod_perl, php # 2000-03-28 Rafael Skodlar HOME=/home/sysadmin WWW=$HOME/tmp/www-server TAR=$HOME/tar APACHE_VER=apache_1.3.12 #APACHE_VER=apache_2.0 MP_VER=mod_perl-1.21 #PHP_VER=php-4.0RC1 PHP_VER=php-3.0.15 BC_MATH_VER=number4 APACHE_DIR=$WWW/$APACHE_VER # MP = mod-perl MP_DIR=$WWW/$MP_VER OPENSSL_VER=openssl-0.9.5 OPENSSL_DIR=$WWW/$OPENSSL_VER PHP_DIR=$WWW/$PHP_VER PHP.INI=$WWW/$PHP_VER/php.ini APACHE_RC=/etc/rc.d/rc3.d/S85httpd if [ ! -e "$TAR/$APACHE_VER.tar.gz" ]; then echo "$TAR/$APACHE_VER.tar.gz missing" exit elif [ ! -e "$TAR/$MP_VER.tar.gz" ]; then echo "$TAR/$MP_VER.tar.gz missing" exit elif [ ! -e "$TAR/$OPENSSL_VER.tar.gz" ]; then echo "Missing: $TAR/$OPENSSL_VER.tar.gz" exit elif [ ! -e "$TAR/$BC_MATH_VER.tar.gz" ]; then echo "Recommended: $TAR/$BC_MATH.tar.gz missing" exit fi if [ ! -d "$WWW" ]; then mkdir $WWW fi date_start=`date '+Start: %H:%M'` cd $WWW tar xvfz $TAR/$APACHE_VER.tar.gz tar xvfz $TAR/$OPENSSL_VER.tar.gz tar xvfz $TAR/$MP_VER.tar.gz tar xvfz $TAR/$PHP_VER.tar.gz cd $PHP_DIR tar xvfz $TAR/$BC_MATH_VER.tar.gz ####################################################################### # mod_perl dir structure first # sequence is important! mod_perl creates files in apache src/modules cd $MP_DIR #perl Makefile.PL APACHE_SRC=$APACHE_DIR/src DO_HTTPD=1 USE_APACI=1 PREP_HTTPD=1 EVERYTHING=1 #perl Makefile.PL APACHE_SRC=$APACHE_DIR/src DO_HTTPD=1 USE_APACI=1 USE_APXS=1 WITH_APXS=/usr/sbin/apxs PREP_HTTPD=1 EVERYTHING=1 # APACHE_SRC=$APACHE_DIR/src \ # USE_APXS=1 \ # WITH_APXS=/usr/local/apache/bin/apxs \ perl Makefile.PL \ APACHE_SRC=../$APACHE_VER/src \ DO_HTTPD=1 \ USE_APACI=1 \ PREP_HTTPD=1 \ EVERYTHING=1 if [ ! -e $MP_DIR/Makefile ]; then echo "Missing $MP_DIR/Makefile" exit fi echo -e "========== Mod_perl configured ==========" sleep 15 make #make install echo "Mod_perl done. Entering: $OPENSSL_DIR" # Open SSL; ./config --prefix=/usr/local --openssldir=/usr/local/openssl cd $OPENSSL_DIR ./config make #make test echo -e "========== $OPENSSL_VER done.\n Entering: $APACHE_DIR/src" sleep 15 # Apache cd $APACHE_DIR/src #./Configure --prefix=/usr/local/apache --enable-module=all --enable-shared=max --activate-module=modules/perl/libperl.a --with-apxs --activate-module=modules/php4/libphp4.a ./Configure \ --prefix=/usr/local/apache \ --enable-module=all \ --enable-shared=max \ --activate-module=modules/perl/libperl.a \ --with-apxs \ --activate-module=modules/php3/libphp4.a # --with-mysql # needed for PHP # --with-mysql --with-apxs cd $PHP_DIR echo -e "========== Now in: $PHP_DIR" sleep 15 ./configure \ --with-apache=$APACHE_DIR \ --enable-track-vars \ --with-imap # --with-apxs # --with-mysql if [ ! -e $PHP_DIR/Makefile ]; then echo "Missing $PHP_DIR/Makefile" exit fi make #make install cd $APACHE_DIR echo -e "===== Now in: $APACHE_DIR" sleep 15 ./configure --prefix=/usr/local/apache --enable-module=all --enable-shared=max --activate-module=src/modules/perl/libperl.a --activate-module=src/modules/php4/libphp4.a #./configure \ # --prefix=/usr/local/apache \ # --enable-module=all \ # --enable-shared=max \ # --activate-module=modules/perl/libperl.a \ # --activate-module=modules/php4/libphp4.a # --with-apxs \ # --with-mysql if [ ! -e $APACHE_DIR/Makefile ]; then echo "Missing $APACHE_DIR/Makefile" exit fi make cat < $PHP.INI <