#!/bin/sh # 0.0.1 # 10/17/00 jgh # Go to directory where all the stuff is cd /usr/local/src/ # Set environment TAR="/bin/tar -zxvf" RM="/bin/rm -rfv" SERVER=puma.bizrate.com APACHE_PREFIX=/home/www/bizrate/ SSL_PREFIX=/usr/local/ssl/ # Get packages ncftpget ftp://$SERVER/pub/Travolta/gzs/www/* # Get install DIRECTORIES echo echo "Make sure all your paths and syntax are correct!!!" echo "Directories must be delimited by and ending / " echo "Example /usr/local/apache/" echo echo -n "Will APACHE be installed to [$APACHE_PREFIX]? " read HTTP case $HTTP in "") APACHE_PREFIX=/home/www/bizrate/ ;; *) APACHE_PREFIX=$HTTP ;; esac echo echo " Apache will be installed to [$APACHE_PREFIX]" echo echo "Make sure all your paths and syntax are correct!!!" echo echo -n "Will SSL be installed to [$SSL_PREFIX]? " read SSL case $SSL in "") SSL_PREFIX=/usr/local/ssl/ ;; *) SSL_PREFIX=$SSL ;; esac echo echo " SSL will be installed to [$SSL_PREFIX]" echo echo "========= PREPARING FOR INSTALL =========" echo "Press enter..." read DUMMY $TAR apache_1.3.12.tar.gz $TAR mm-1.1.3.tar.gz $TAR mod_perl-1.24.tar.gz $TAR mod_ssl-2.6.5-1.3.12.tar.gz $TAR openssl-0.9.5a.tar.gz echo "========= End PREPARATION =========" echo "Press enter..." read DUMMY # Configure and install OpenSSL echo "========= START openssl INSTALL =========" cd openssl-0.9.5a ./config --prefix="${SSL_PREFIX}" --openssldir="${SSL_PREFIX}" make make test make install cd .. echo "========= END openssl INSTALL =========" echo "Press enter..." read DUMMY # Configure and install mm (http://www.engelschall.com/sw/mm/) # Optional, to use shared memory for SSL keys echo "========= START mm INSTALL =========" cd mm-1.1.3 ./configure --disable-shared make cd .. echo "========= END mm INSTALL =========" echo "Press enter..." read DUMMY # Configure mod_ssl # Do not make echo "========= START mod_ssl CONFIGURATION =========" cd mod_ssl-2.6.5-1.3.12 ./configure --with-apache=../apache_1.3.12 \ --with-ssl="${SSL_PREFIX}" \ --prefix="${APACHE_PREFIX}" \ --with-mm=../mm-1.1.3 \ --disable-rule=SSL_COMPAT \ --enable-rule=SSL_SDBM cd .. echo "========= END mod_ssl CONFIGURATION =========" echo "Press enter..." read DUMMY # Configure and install mod_perl echo "========= START mod_perl INSTALL =========" cd mod_perl-1.24 perl Makefile.PL \ EVERYTHING=1 \ APACHE_SRC=../apache_1.3.12/src \ USE_APACI=1 \ PREP_HTTPD=1 \ DO_HTTPD=1 \ APACHE_PREFIX="${APACHE_PREFIX}" make make install cd .. echo "========= END mod_perl INSTALL =========" echo "Press enter..." read DUMMY # Configure and install Apache echo "========= START Apache INSTALL =========" cd apache_1.3.12 SSL_BASE="${SSL_PREFIX}" \ EAPI_MM=../mm-1.1.3 \ ./configure \ --prefix="${APACHE_PREFIX}" \ --enable-module=ssl \ --activate-module=src/modules/perl/libperl.a \ --enable-module=perl \ --enable-module=rewrite \ --enable-module=unique_id \ --enable-module=alias \ --enable-module=expires \ --disable-module=include \ --activate-module=src/modules/standard/mod_info.c \ --enable-module=info \ --disable-module=imap \ --disable-module=mmap_static \ --enable-module=status \ --enable-module=auth \ --enable-module=userdir \ --enable-module=actions \ --enable-module=asis \ --enable-module=cgi \ --enable-module=autoindex \ --enable-module=negotiation \ --enable-module=env make make certificate make install cd .. echo "========= END Apache INSTALL =========" echo "Press enter..." read DUMMY echo "========= SEND IN THE MAID =========" echo "Press enter..." read DUMMY $RM apache_1.3.12* $RM mm-1.1.3* $RM mod_perl-1.24* $RM mod_ssl-2.6.5-1.3.12* $RM openssl-0.9.5* echo "========= END MAID SERVICE =========" echo "Press enter..." read DUMMY echo echo "========= ADD SERVICE =========" chmod +x /usr/local/src/www cp /usr/local/src/www /etc/rc.d/init.d/www $RM www echo echo "Make sure your path to apachectl is correct! Edit /etc/rc.d/init.d/www" echo echo "========= SERVICE ADDED =========" echo echo "========= ADDING RUNLVLS =========" echo ln -s /etc/rc.d/init.d/www /etc/rc.d/rc0.d/K15www echo "...linked to runlevel 0" ln -s /etc/rc.d/init.d/www /etc/rc.d/rc3.d/S80www echo "...linked to runlevel 3" ln -s /etc/rc.d/init.d/www /etc/rc.d/rc6.d/K15www echo "...linked to runlevel 6" echo echo "========= RUNLVLS ADDED =========" echo echo "Done." exit 0