Thursday, September 9, 2010

Apache Installation on Linux ( Compile)

Download and Install Apache 2.2

Download apache from the Apache 2.2 http://httpd.apache.org/download.cgi#apache22

Look for the section with the phrase "best available version" like "Apache HTTP Server (httpd) 2.2.x is the best available version". At the time of writing this tutorial Apache 2.2.16 is the official best available version.

Click on the link for "httpd-2.2.16.tar.gz" and download the installer.



Once the file is copied on the Linux server (example: /usr/local/install).

1. Use the following command to extract the tar file.

cd /usr/local/install

tar -xzf httpd-2.2.16.tar.gz


A directory will be created "httpd-2.2.16"

2. Now, Let`s execute the configuration script:

cd /usr/local/install/httpd-2.2.16

./configure --prefix=/usr/local/install/apache --enable-mods-shared=all --enable-proxy --enable-expires --enable-vhost-alias

or

./configure --prefix=/usr/local/install/apache --enable-so --with-mpm=worker --enable-proxy=share --enable-ssl --enable-proxy --enable-rewrite --enable-headers --enable-deflate --enable-proxy-http --enable-proxy-balancer --enable-proxy-ajp --enable-expires --enable-usertrack


3. The following steps will compile Apache based upon the configuration defined:

make



4. The following step will install the Apache build:

make install



5. Use the following commands to control the Apache Web Server.

/usr/local/install/apache/bin/apachectl -k stop

/usr/local/install/apache/bin/apachectl -k start



6. Go to the internet browser and try the url http://host:80/.

You should see, It Works!

This means, the Apache webserver installation went successful.

No comments:

Post a Comment