SungHoon_Kim

Compiling ASF Apache 2.4.x on RedHat Enterprise Linux

Blog Post created by SungHoon_Kim Employee on Mar 2, 2017

First the prerequisites:

# yum -y install gcc gcc-c++ autoconf automake zlib-devel openssl openssl-devel

 

Download the following files.

pcre-8.40.tar.gz from http://pcre.org

apr-1.5.2.tar.gz from http://apr.apache.org

apr-util-1.5.4.tar.gz from http://apr.apache.org

httpd-2.4.25.tar.gz from http://httpd.apache.org

 

Let's create a folder to extract all these files.

Move them to /apps/testing/ and extract them all.

 

The pcre must be compiled first.

# cd /apps/testing/pcre-8.40

# ./configure --prefix=/opt/local/pcre

# make

# make install

 

 

Apache is extracted to /apps/testing/httpd-2.4.25

Move the apr and apr-util to <apache>/srclib/ folder.

# mv /apps/testing/apr-1.5.2 /apps/testing/httpd-2.4.25/srclib/apr/

# mv /apps/testing/apr-util-1.5.4 /apps/testing/httpd-2.4.25/srclib/apr-util/

 

Then compile the apache with following command:

# cd /apps/httpd.2.4.25

# export LIBS=-lpthread

./configure --prefix=/opt/apache2425 --with-pcre=/usr/local/pcre --with-included-apr --with-included-apr-util --enable-so --enable-mods-shared=all --enable-ssl --enable-modules=most --with-mpm=worker

# make

# make install

 

Then you would have apache compiled and installed successfully.

Outcomes