Apache Install

Download the latest Apache server (httpd) tar file from http://httpd.apache.org/ and untar it in the top level source directory (e.g. /rpm/Apache):

     tar -xvzf httpd-m.n.xx.tar.gz

Now, make sure that you have libtool and the libtool development tools installed. You can use the typical package version that comes with your OS but make sure the development package is also installed (e.g. libtool-devel). If it is not, you'll get a build error.

Also, make sure that you have pcre and the pcre development tools installed. You can use the typical package version that comes with your OS but make sure the development package is also installed (e.g. pcre-devel). Failure to install it will get you a build error.

It will create a new directory for that version of Apache. Switch to that directory and build Apache:

     cd httpd-m.n.xx
     ./configure --prefix=/usr/share/httpd-m.n --enable-proxy --enable-rewrite
     make

The install directory is given by "--prefix". It should probably include the two high-level version numbers so that previous versions of httpd can be kept for posterity. The "--enable-proxy" flag allows httpd to pass requests through to another httpd on another server.

Switch to super-duper user and install Apache:

     su
     make install

Note that, if you are building Apache 2.4.x or later, there is an added level of b.s. that you may need to go through, before you can build Apache. It depends on what is automatically installed by your version of the OS but, if you experience the error message:

     configure: error: APR not found.  Please read the documentation.

You first need to install APR into the build tree before you can continue. Surf over to apr.apache.org/download.cgi and get the latest versions of the portable library and the utilities in the top-level directory:

     apr-a.b.xx.tar.bz2
     apr-util-c.d.xx.tar.bz2

Then, unpack and build the files like this:

     tar -xvjf apr-a.b.xx.tar.bz2
     cd apr-a.b.xx
     ./configure
     make
     su
     make install
     <Ctrl-D>
     cd ..
     tar -xvjf apr-util-c.d.xx.tar.bz2
     cd apr-util-c.d.xx
     ./configure with-apr=../apr-a.b.xx
     make
     su
     make install

Now, move to the httpd build directory and build Apache like this:

     cd httpd-m.n.xx
     ./configure --prefix=/usr/share/httpd-m.n --enable-proxy --enable-rewrite
     make

Note that, if you unpack a different httpd source file or get later versions of apr or apr-util, you must redo the symlinks.