//
you're reading...
Apache Httpd

Apache Httpd server Installation (source code) on CentOS Linux

Install Apache Httpd server on CentOS Linux

Operation System:
CentOS6.7 X86_64

Software Packages required

Apache HTTPD httpd-2.2.23.tar.gz
Apache Portable Runtime apr-1.5.1.tar.gz
APR-util apr-util-1.5.4.tar.gz
PRCE (for apache 2.4) pcre-8.36.tar.gz

Step1) Unzip the installation package

[root@LXTESTWIKI01 ~]# tar -xvzf httpd-2.2.29.tar.gz
[root@LXTESTWIKI01 ~]# tar -xvzf apr-1.5.1.tar.gz
[root@LXTESTWIKI01 ~]# tar -xvzf apr-util-1.5.4.tar.gz
[root@LXTESTWIKI01 ~]# tar -xvzf pcre-8.36.tar.gz

Step2) Install Apache Portable Runtime

[root@LXTESTWIKI01 ~]# cd /root/apr-1.5.1/
[root@LXTESTWIKI01 apr-1.5.1]# ./configure --prefix=/usr/local/apr
[root@LXTESTWIKI01 apr-1.5.1]# make
[root@LXTESTWIKI01 apr-1.5.1]# make install

Step3) Install APR-util

[root@LXTESTWIKI01 ~]# cd /root/apr-util-1.5.4/
[root@LXTESTWIKI01 apr-util-1.5.4]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
[root@LXTESTWIKI01 apr-util-1.5.4]# make
[root@LXTESTWIKI01 apr-util-1.5.4]# make install

Step4) Install PCRE

[root@LXTESTWIKI01 pcre-8.36]# cd /root/pcre-8.36
[root@LXTESTWIKI01 pcre-8.36]# ./configure --prefix=/usr/local/pcre
[root@LXTESTWIKI01 pcre-8.36]# make
[root@LXTESTWIKI01 pcre-8.36]# make install

Step5) Install Apache HTTPD 2.2.3

[root@LXTESTWIKI01 ~]# cd /root/httpd-2.2.23
[root@LXTESTWIKI01 httpd-2.2.23]# ./configure \
--prefix=/usr/local/apache \
--enable-so \
--enable-mods-shared=most \
--with-mpm=worker \
--with-apr=/usr/local/apr/ \
--with-apr-util=/usr/local/apr-util \
--with-included-apr=/usr/local/apr

For Apache 2.4.2 installation

[root@LXTESTWIKI01 ~]# cd /root/httpd-2.4.21
[root@LXTESTWIKI01 httpd-2.4.21]# ./configure \
--prefix=/usr/local/apache \
--enable-so \
--enable-mods-shared=most \
--with-mpm=worker \
--with-apr=/usr/local/apr/ \
--with-apr-util=/usr/local/apr-util \
--with-pcre=/usr/local/pcre \
--with-included-apr=/usr/local/apr/ \
--ap_cv_void_ptr_lt_long=no

During the configuring, if received the error configure: error: Size of “void *” is less than size of “long, we can resolve that by modify the configure file.

if test "$ap_cv_void_ptr_lt_long" = "yes"; then
    as_fn_error $? "Size of \"void *\" is less than size of \"long\"" "$LINENO" 5
if test "$ap_cv_void_ptr_lt_long" != "yes"; then
    as_fn_error $? "Size of \"void *\" is less than size of \"long\"" "$LINENO" 5

change the = in font of yes to !=


[root@LXTESTWIKI01 httpd-2.2.23]# make
[root@LXTESTWIKI01 httpd-2.2.23]# make install

Change the permission of the Apache Httpd bin folder


[root@LXTESTWIKI01 httpd-2.2.23]# groupadd www
[root@LXTESTWIKI01 httpd-2.2.23]# usermod -G www apache
[root@LXTESTWIKI01 httpd-2.2.23]# chown -R apache:www /usr/local/apache

Advertisements

About daviewning

I am an Oracle DBA

Discussion

Trackbacks/Pingbacks

  1. Pingback: PHP 5.5 Installation (source code) on CentOS Linux | DBTechZone - March 16, 2016

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: