Apache

From CBLFS
Revision as of 09:16, 25 November 2006 by Jciccone (talk | contribs) (32Bit)
Jump to navigationJump to search
Download Source: http://www.apache.org/dist/httpd/httpd-2.2.3.tar.bz2
Download Patch: http://svn.cross-lfs.org/svn/repos/patches/httpd/httpd-2.2.3-config-1.patch

Dependencies

Optional

Creating the Apache User/Group

groupadd -g 25 apache &&
useradd -c "Apache Server" -d /dev/null -g apache \
        -s /bin/false -u 25 apache

Configuration Information

See ./configure --help for more configuration options.

Non-Multilib

The following patch modifies the layout of destination directories and among them, the build directory at /usr/lib/apache/build. This will allow the modules added to Apache to be configured without errors:

patch -Np1 -i ../httpd-2.2.3-config-1.patch

Compile the package:

./configure --enable-layout=FHS --enable-mods-shared=all &&
make

Install the package

make install &&
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 -Rv apache:apache /srv/www

Multilib

32Bit

The following patch modifies the layout of destination directories and among them, the build directory at /usr/lib/apache/build. This will allow the modules added to Apache to be configured without errors:

patch -Np1 -i ../httpd-2.2.3-config-1.patch

Compile the package:

CC="gcc ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" USE_ARCH=32 \
./configure --enable-layout=FHS --enable-mods-shared=all &&
make

Install the package

make install

If you built Apache with the internal APR and APR-util then run the following commands:

mv -v /usr/bin/apr-1-config{,-32}
mv -v /usr/bin/apu-1-config{,-32}

N32

Please contribute this section

64Bit

The following patch modifies the layout of destination directories and among them, the build directory at /usr/lib/apache/build. This will allow the modules added to Apache to be configured without errors:

patch -Np1 -i ../httpd-2.2.3-config-1.patch

Compile the package:

sed -i -e "s/lib$/&64/" \
       -e "s:lib/apache$:lib64/apache:g" config.layout &&
sed -i -e "/expat_ldflags/s:/lib:&64:" \
       -e "/expat_libtool/s:/lib/:/lib64/:" srclib/apr-util/configure &&
CC="gcc ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" USE_ARCH=64 \
./configure --enable-layout=FHS --enable-mods-shared=all --libdir=/usr/lib64 &&
make

Install the package

make install

If you built Apache with the internal APR and APR-util then run the following commands:

mv -v /usr/bin/apr-1-config{,-64} &&
ln -sfv multiarch_wrapper /usr/bin/apr-1-config &&
mv -v /usr/bin/apu-1-config{,-64} &&
ln -sfv multiarch_wrapper /usr/bin/apu-1-config
Retrieved from "?title=Apache&oldid=4202"