Install prerequisites: autoconf automake bison flex gcc gcc-c++ make db db-devel db-utils zlib zlib-devel openssl openssl-devel ncftp lynx neon neon-devel libevent giflib giflib-devel libjpeg libjpeg-devel libpng libpng-devel libtiff libtiff-devel libxml2 libxml2-devel gzip bzip2 zlib zlib-devel Install CPAN modules: ExtUtils::XSBuilder Parse::RecDescent ====================================================== Get the source files ======================================================== export MPM="prefork" export SUFFIX="_${MPM}_perl_php" export CFLAGS="WHATEVER CFLAGS YOUR PROCESSOR SUPPORTS" cd ~ rm -Rf apache_and_friends mkdir -p apache_and_friends/packages cd apache_and_friends/packages # See http://httpd.apache.org/download.cgi wget http://apache.rediris.es/httpd/httpd-2.2.9.tar.gz # See http://perl.apache.org/download/index.html wget http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz # See http://httpd.apache.org/apreq/download.cgi wget http://apache.rediris.es/httpd/libapreq/libapreq2-2.08.tar.gz cd .. tar -xzf packages/httpd* tar -xzf packages/mod_perl* tar -xzf packages/libapreq* ====================================================== Setup Apache server ======================================================== export APACHE=`echo httpd*` echo "INSTALLING to /opt/$APACHE$SUFFIX" cd $APACHE # This sets up the apache binaries in /opt/httpd....... # with (eg) conf, htdocs etc in /opt/apache/ # adjust the options below for the environment that you want ./configure --prefix=/opt/$APACHE$SUFFIX \ --localstatedir=/opt/apache \ --sysconfdir=/opt/apache/conf \ --datadir=/opt/apache \ --with-mpm=$MPM\ --enable-cache=shared\ --enable-deflate=shared\ --enable-disk-cache=shared\ --enable-file-cache=shared\ --enable-info=shared\ --enable-mem-cache=shared\ --enable-rewrite=shared\ --enable-dav=shared\ --enable-auth-digest\ --enable-ssl=shared\ --enable-expires=shared\ --enable-unique-id=shared\ --enable-usertrack=shared make rm -Rf /opt/$APACHE$SUFFIX make install cd .. ====================================================== Setup mod_perl ======================================================== cd mod_perl-* perl Makefile.PL \ MP_AP_PREFIX=/opt/$APACHE$SUFFIX \ MP_COMPAT_1X=0 make make test && make install && cd .. ====================================================== Setup libapreq ======================================================== cd libapreq* perl Makefile.PL --with-apache2-apxs=/opt/$APACHE$SUFFIX/bin/apxs make && make test && make install cd .. ######################################################## ln -fs /opt/$APACHE$SUFFIX/* /opt/apache ln -sf /opt/apache/bin/apachectl /usr/bin/apachectl ln -sf /opt/apache/bin/apachectl /etc/rc.d/httpd chkconfig httpd on groupadd -r apache useradd -r apache -g apache