Quickie: Install Apache 2.2.4 on Ubuntu

May not be the best, but ... here's how I installed Apache 2.2.4 on Ubuntu (7.04), based on David Winter's guide Building Apache 2.2 from source for Ubuntu Dapper.

All code from a terminal, unless otherwise noted.

sudo apt-get install build-essential

mkdir src
cd src

I downloaded zlib from http://www.zlib.net/ (zlib source code, version 1.2.3, tar.gz format) into the src folder, and extracted it to the same.

cd zlib-1.2.3/
./configure --prefix=/usr/local
sudo make install

At http://httpd.apache.org/download.cgi, I downloaded Unix Source: httpd-2.2.4.tar.gz, saved it to the src directory, and extracted it to the same.

cd httpd-2.2.3/

./configure --prefix=/usr/local/apache2 --enable-mods-shared=all --enable-deflate --enable-proxy --enable-proxy-balancer --enable-proxy-http

make (which took a long time)

sudo make install

sudo /usr/local/apache2/bin/apachectl start, followed by heading over to http://localhost/, which worked.

sudo /usr/local/apache2/bin/apachectl stop

sudo cp /usr/local/apache2/bin/apachectl /etc/init.d/apachectl
sudo chmod +x /etc/init.d/apachectl

sudo nano /etc/init.d/apachectl

The top of the page should look like this, after the bold text is added.

# chkconfig: - 85 15
# description: Apache is a web server.

Ctrl + X will exit, during which you'll be prompted to save (do so).

sudo /usr/sbin/update-rc.d apachectl defaults

sudo adduser --system apache

sudo nano /usr/local/apache2/conf/httpd.conf

Find the following:

User daemon
Group daemon

Change it to the following:

User apache
Group nogroup

Save, as above.

sudo /usr/local/apache2/bin/apachectl start

ps -aux | grep httpd

I've yet to reboot the machine and verify that apache is running on this boxes' IP - I'll do so later.

Now the question I have is, how would I go about removing Apache 2.2.4? Research time ...