H-Sphere Documentation Sysadmin Guide

For more information contact us at info@psoft.net

Apache Compilation

 

Often Apache needs to be recompiled on the web box to add some additional features. With H-Sphere, apache is compiled with standard DSO module support and can be reinstalled at any time if needed. To compile apache for H-Sphere:

  1. Log into your web server as root:
    su -
  2. Create a directory for source files and patches:
    # mkdir DIRECTORY_NAME
    and enter this directory:
    # cd DIRECTORY_NAME
  3. Download source files:
    # wget http://www.apache.org/dist/httpd/apache_1.3.27.tar.gz
    # wget http://www.modssl.org/source/mod_ssl-2.8.11-1.3.27.tar.gz
    # wget http://ftp.proventum.net/pub/php/php4/php-4.1.2.tar.gz
    # wget http://www.psoft.net/shiv/apache/mod_throttle312.tgz
    # wget http://www.psoft.net/shiv/apache/mod_frontpage-1.6.1.tar.gz
  4. Unpack each of these files:
    # tar -xzf FILENAME.tgz
    where FILENAME is the name of the downloaded file.
  5. Download patches:
    # wget http://www.psoft.net/shiv/apache/fp-patch-apache_1.3.22
    # wget http://www.psoft.net/shiv/apache/fp-patch-suexec
    # wget http://www.psoft.net/shiv/apache/hlimit.diff
    # wget http://www.psoft.net/shiv/apache/modfp.patch
    # wget http://www.psoft.net/shiv/apache/modthrottle.patch
  6. Change to the apache installation directory:
    cd apache-1.3.27
    and run the following commands:
    patch -p0 < ../fp-patch-apache_1.3.22 #to fix FRONTPAGE
    patch -p0 < ../fp-patch-suexec #to fix FRONTPAGE-SUEXEC
    patch -p0 < ../hlimit.diff #to fix MAX CLIENT LIMIT
  7. Change to the modssl installation directory:
    cd ../modssl-2.8.11-1.3.27
    and run the following commands:
    RSAREF_BASE=/hsphere/shared/lib
    SSL_BASE=/usr
    EAPI_MM=/hsphere/shared
    export SSL_BASE EAPI_MM RSAREF_BASE
    ./configure --with-apache=../apache_1.3.27 \
        --with-mm=/hsphere/shared \
        --with-ssl=/usr \
        --localstatedir=/var/hsphere/ssl
  8. Change back to the apache installation directory:
    cd ../apache-1.3.27
    and run the configure command:
    ./configure \
            --prefix=/hsphere/shared/apache \
            --server-uid=httpd \
            --server-gid=httpd \
            --sysconfdir=/hsphere/local/config/httpd \
            --enable-suexec \
            --localstatedir=/hsphere/local/var/httpd \
            --suexec-logfile=/hsphere/local/var/httpd/logs/suexec_log \
            --suexec-caller=httpd \
            --suexec-docroot=/hsphere/local \
            --enable-module=most \
            --enable-shared=remain \
            --add-module=mod_frontpage.c \
            --disable-shared=frontpage \
            --enable-module=ssl
    
  9. Back up original htdocs:
    mv /hsphere/shared/apache/htdocs /hsphere/shared/apache/htdocs.bak
  10. In the apache installation directory, compile and install apache:
    make
    make install
  11. Replace new document root with your old one:
    rm -rf /hsphere/shared/apache/htdocs
    mv /hsphere/shared/apache/htdocs.bak /hsphere/shared/apache/htdocs
  12. Change to the php installation directory:
    cd ../php-4.1.2 and run the configure command:
    ./configure \
            --with-apxs=/hsphere/shared/apache/bin/apxs \
            --with-zlib-dir \
            --with-jpeg-dir \
            --with-png-dir \
            --with-gd=/hsphere/shared \
            --with-mysql=/usr \
            --with-gettext \
            --disable-debug \
            --enable-versioning \ 
            --enable-sockets \
            --enable-track-vars \
            --with-imap=/hsphere/shared \
            --with-pgsql=/usr \
            --enable-ftp \
            --localstatedir=/var/hsphere/php
    
  13. In the php installation directory, compile and install php:
    make
    make install
  14. Change to the mod_frontpage installation directory:
    cd ../mod_frontpage-1.6.1
    then apply the mod_fronpage fix:
    patch -p0 < ../modfp.patch
    then compile and install mod_frontpage:
            perl Makefile.PL
            make
            make install
    
  15. Change to the mod_throttle installation directory:
    cd ../mod_throttle-3.1.2
    then apply the modthrottle patch:
    patch -p0 < ../modthrottle.patch
    and then compile and install modthrottle:
            make
    	make install
    


Home   Products   Services   Partners   Support   News   Contact   Forum
© Copyright 1998-2003. Positive Software Corporation.
All rights reserved.