26/04/2007 - Building apache 2.2.4 and subversion 1.4.3 on Ubuntu
I've mentioned before that I compiled and installed Apache 2.2 and Subversion 1.4 on my Ubuntu machine due to the fact that the pre-built versions were pretty old. I recently upgrade the box to Ubuntu Fiesty (from Edgy) and that somehow installed Apache 2.2 and Subversion again (even though I had removed the subversion package before, and also removed the older Apache 2.0 package). That prompted me to remove them and to also update my own versions as I actually wanted to put Subversion in a different place to where I put it originally. While I was doing it I made a note of what I did so that I had instructions to follow if I need to do it again in the future (or just need to build a newer version).
If you follow the instructions then you will download Apache 2.2.4, Subversion 1.4.3, NEON 0.26.2, and also Berkeley DB 4.5.20 (as for some reason Subversion couldn't find the previously installed versions).
========================
= STEP 1 - DOWNLOADING =
========================
Download svn:
wget http://subversion.tigris.org/downloads/subversion-1.4.3.tar.gz
Download apache2 2.2.4:
wget http://apache.openmirrors.org/httpd/httpd-2.2.4.tar.gz
Download NEON:
wget http://www.webdav.org/neon/neon-0.26.2.tar.gz
Download Berkeley DB
wget http://download.oracle.com/berkeley-db/db-4.5.20.tar.gz
======================
= STEP 2 - COMPILING =
======================
Extract sources:
tar xf subversion-1.4.3.tar.gz
tar xf httpd-2.2.4.tar.gz
tar xf neon-0.26.2.tar.gz
tar xf db-4.5.20.tar.gz
Build and install Berkeley DB
cd db-4.5.20/build_unix
../dist/configure --prefix=$HOME/bin
make
make install
cd ../..
Build and install apr 1.2
cd httpd-2.2.4/srclib/apr
./configure --prefix=$HOME/bin
make
make install
cd ..
Build and install apr-util 1.2
cd apr-util
./configure --prefix=$HOME/bin --with-apr=$HOME/bin \
--with-berkeley-db=$HOME/bin
make
make install
cd ../../..
Build apache2
cd httpd-2.2.4
./configure --prefix=$HOME/bin/apache2 --with-apr=$HOME/bin \
--with-apr-util=$HOME/bin --enable-dav --enable-dav-lock \
--enable-proxy --enable-proxy-http --enable-rewrite \
--enable-ssl --enable-mods-shared=all
make
make install
cd ..
Build neon
cd neon-0.26.2
./configure --prefix=$HOME/bin --with-ssl=openssl
make
make install
cd ..
Build subversion
cd subversion-1.4.3
./configure --prefix=$HOME/bin --with-apxs=$HOME/bin/apache2/bin/apxs \
--with-neon=$HOME/bin --with-berkeley-db=$HOME/bin \
PYTHON=/usr/bin/python PERL=/usr/bin/perl
make
make install
cd ..
======================
= STEP 3 - AUTOSTART =
======================
Copy apachectl to /etc/init.d
sudo cp apachectl /etc/init.d/apache2ctl
Autostart apache2ctl
sudo update-rc.d apache2ctl defaults
I copied
apachectl as apache2ctl as I'm used to typing that for Apache 2 when I also had Apache 1 on there. I just like having a seperating version number in the name.Berkeley DB, the Apache 2 apr and apr-utils tools, NEON and Subversion are installed into the
$HOME/bin prefix, but I put Apache 2 into the $HOME/bin/apache2 prefix so that it's seperate and easier to work with (it uses more folders than the normal that you find in a /bin directory). I also have Apache 2 build with all the modules built as shared and all enabled, plus also build the proxy modules and ssl support.

0 comments:
Post a Comment