Compiling httpd-2.4.20 from source

Compiling httpd-2.4.20 from source :

#tar -xvzf httpd-2.4.20.tar.bz2
#bzip2 -d httpd-2.4.20.tar.bz2
# tar -xvf httpd-2.4.20.tar

Requires apr and apr-util

#cd /httpd_source_tree_root/srclib/

Extract apr and apr-util to directories   ‘/httpd_source_tree_root/srclib/apr’ and ‘/httpd_source_tree_root/srclib/apr-util’ respectively


# ./configure –prefix=/usr/local/apache/ –with-included-apr –with-pcre=/usr/local/bin/pcre-config –enable-expires=shared –enable-deflate=shared –enable-mpms-shared=all –enable-v4-mapped –with-openssl=/usr –with-openssl-dir=/usr –with-z=/usr

# make
#make install
# /usr/local/apache/bin/apachectl -k start


Unix Build Instructions for FCGID 

To build and install as a DSO outside of the httpd source
build, from the fcgid source root directory, simply;

    make install

If apxs is not in your path, or you are building to a different
httpd installation, or your distribution has an alternate script
name for apxs (e.g. apxs2), then either set the APXS environment
variable, or use the syntax;

    APXS=/path/to/bin/apxs ./configure.apxs

so the desired configuration is used.

To build static, or as a DSO but within the same build as httpd,
copy the entire fcgid source directory tree on top of your existing 
httpd source tree, and from the httpd source root directory

    ./buildconf  (to pick up fcgid)
    ./configure --enable-fcgid {your usual options}

and proceed as usual.

2 thoughts on “Compiling httpd-2.4.20 from source

  1. If mod_deflate is causing error with zlib :

    # yum install zlib-static

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s