Monday 10 August 2015

How to install Apache http with Source

What is Apache http server?

Apache Web Server is an open source Web server, Apache Web Server have the ability to host one or more HTTP-based websites.

Step1: Apache Installation source: The source apache for linux can be downloaded from http://httpd.apache.org/download.cgi

Step2: Prerequisites: apache source (httpd-2.4.12.tar.gz), apr, apr-util, pcre, gcc.

Download the apache source /opt/apps/httpd-2.4.12.tar.gz (you can place any where you want to install)

Command: tar xvf httpd-2.4.12.tar.gz

/opt/apps/httpd-2.4.12

Step3: Go to https://apr.apache.org/download.cgi and download:

  • Unix Source: apr-1.5.2.tar.gz [PGP] [MD5]
  • Unix Source: apr-util-1.5.4.tar.gz [PGP] [MD5]

Rename apr-1.5.2.tar.gz to apr and Rename apr-util-1.5.4.tar.gz to apr-util

Step4: copy apr and apr-util to /opt/apps/httpd-2.4.12/srclib/

Step5: Install GCC, gcc can be installed by source or by yum package manager

Command: yum install -y gcc

Step6: Install PCRE and pcre-devel.

Command: yum install -y pcre*

OR download the source and intall:

Command: ./configure --prefix=/usr/local/pcre

Step7: Now move to /opt/apps/httpd-2.4.12/

Command: ./configure --prefix=/opt/apps/apache24 --enable-so

--prefix=/opt/apps/apache24 (Prefix is used to set the installation path and directory)

Command: make

Command: make install

Step8: . /opt/apps/apache24/bin/apachectl -k start ( you can user parameters as: start, stop, status)

No comments:

Post a Comment

Please comment