Subscribe Us


Recent In Voip




Install Apache from source code


How to Install Apache from Source Code.

1) first of all  we require  following source code
(a) apr (Apache portable run time libraries)

(b)  apr-util (apache portable runtime utilities)

(c) pcre-(python compatable regular expressions

(d) httpd  -

I made one directory  named abhay and download all these 4 source code .
  mkdir abhay

2) extract all files using tar command

a) tar -xvzf apr-1.6.2.tar.gz
b) tar -xvzf apr-util-1.6.0.tar.gz
c) tar -xvzf pcre-8.41.tar.gz
d) tar -xvzf httpd-2.4.27.tar.gz

3) mkdir -p /usr/local/pcre
Now under abhay directory go to pcre folder
and run this command

(a) ./configure --prefix=/usr/local/pcre

(b) now run make command (make is build tool to build all files

(c) now run make install

step4 )
now we  mv apr-1.6.2  apr (for omitting version as ease for naming)
 a) mv apr-1.6.2  apr

b) mv apr-util-1.6.0 apr-util

and now move all these files  apr apr-util under httpd-2.4.27/srclib

c) mv apr httpd-2.4.12/srclib/
d) mv apr-util httpd-2.4.27/srclib

e) ls httpd-2.4.27/srclib/

and  run command
f)cd httpd-2.4.27/

step 6)
now run command

./configure       (to compile and build the source code)

mkdir -p /opt/apache2

./configure --prefix=/opt/apache2/ --with-pcre=/usr/local/pcre

step 8)
run a) make

     b) make install
cd /opt/apache2
under apache2 folder we will find bin
cd /bin

step 10)
under cd /bin

./apachectl  (run this script)
 or you also run this command
systemctl restart

type ifconfig and open ip in browser

In My case http://

Hope You like my Post .

Any Suggestion and question are highly appriciated.

0 on: "Install Apache from source code "