Wednesday, July 04, 2012

Steps Involved to install Apache 2.4.2 server on Red Hat Linux


 -- Steps Involved to install Apache 2.4.2 server.

1 - Download Apache 4.2.2 server.
Please find the below link to download the Apache 4.2.2. server http://httpd.apache.org/docs/2.4/install.html#download

For Liux O/S: http://httpd.apache.org/download.cgi#apache24

Download httpd-2.4.2.tar.gz

Untar above zip in current “/” directory of Linux using following commands:

1) gzip -d httpd-2.4.2.tar.gz
2) tar xvf httpd-2.4.2.tar

2 - Download apr, apr-util and pcre required to run Apache Server. 
Please find the below link to download the apr, apr-util and pcre ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/

 

Keep the above files inside /httpd-2.4.2/srclib  and perform following steps

1) cd /httpd-2.4.2/srclib
2) gzip -d apr-1.4.6.tar.gz
3) tar xvf apr-1.4.6.tar
4) gzip -d apr-util-1.4.1.tar.gz
5) tar xvf apr-util-1.4.1.tar
6) gzip -d pcre-8.20.tar.gz
7) tar xvf pcre-8.20.tar

Rename all the above folder inside /httpd-2.4.2/srclib from
-apr-1.4.6 to apr
-apr-util-1.4.1 to apr-util
-pcre-8.20.tar to pcre

3 - Configure pcre package.

Execute the following steps to configure pcre package on Linux Box.

1) cd /httpd-2.4.2/srclib/pcre
2) ./configure
3) make
4) make install

4 - Installing Apache Server.

Please follow following steps to installed Apache Server.

1) cd /httpd-2.4.2
2) ./configure --prefix=/httpd-2.4.2 \
--with-included-apr
3) make
4) make install

Make following changes into httpd.conf

1) Vi /httpd-2.4.2/conf/httpd.conf
a. Listen IPADDRESSOFMACHINE:9090
b. ServerName IPADDRESSOFMACHINE:9090

5 - Starting Apache Server.

Set the Path variable with following command:

export PATH=$PATH$:/httpd-2.4.2/bin:

Stop the existing httpd service

service httpd stop

Run the Apache Server with following command

/httpd-2.4.2/bin/apachectl -k start

Note : Please cross verify that your 9090 port is available and not in used by other application.