mount -wo remount /
cd /usr/src
tar -xjf httpd-2.2.2.tar.bz2
cd httpd-2.2.2
groupadd -g 25 apache
useradd -c "Apache Server" -d /dev/null -g apache -s /bin/false -u 25 apache
(patch -Np1 -i ../httpd-2.2.2-config-1.patch) 2>&1 | tee -a ../apache.out
(./configure --enable-layout=FHS --enable-mods-shared=all --with-expat=/usr --enable-ssl --with-pcre --with-z) 2>&1 | tee -a ../apache.out
(make) 2>&1 | tee -a ../apache.out
(make install) 2>&1 | tee -a ../apache.out
chown -v root:root /usr/lib/apache/httpd.exp \
/usr/sbin/{apxs,apachectl,dbmmanage,envvars{,-std}} \
/usr/share/man/man1/{dbmmanage,ht{dbm,digest,passwd}}.1 \
/usr/share/man/man8/{ab,apachectl,apxs,htcacheclean,httpd}.8 \
/usr/share/man/man8/{logresolve,rotatelogs,suexec}.8 &&
chown -v -R apache:apache /srv/www
sed -i -e "s/User daemon/User apache/" -e "s/Group daemon/Group apache/" /etc/apache/httpd.conf
cd /sources/blfs-bootscripts-20060624/
make install-apache
cd
mount -ro remount /
The mount commands are necessary because our systems run with a read-only root filesystem (which is
where we will be installing Apache). The build takes place in /usr/src/httpd-2.2.2 (the Apache source tree
after it is uncompressed by tar), and the install is to directories in the /usr directory tree.
This configuration is based on Beyond Linux From Scratch 6.2, and causes Apache to run its slave processes under the unprivileged user "apache". The "expat", "ssl", "pcre" and "z" parameters to configure tells Apache to use the versions which are already installed. The file /etc/rc.d/init.d/apache is the script used to start and stop Apache.
The access_log file contains the following information for every file served to a client:
©2006, Kenneth R. Koehler. All Rights Reserved. This document may be freely reproduced provided that this copyright notice is included.
Please send comments or suggestions to the author.