Apache is one of the most popular web servers, and part of its charm is that it's free. It also has a lot of features that make it very extensible and useful for many different types of websites. It is a server that is used for everything from personal web pages to enterprise level sites.
This article will discuss how to install Apache on a Linux system.
Download Apache
ex: httpd-2.0.55.tar
setp1:
gunzip -d httpd-2_0_NN.tar.gz
tar xvf httpd-2_0_NN.tar
This creates a new directory under the current directory with the source files.
Configuring Your Server for Apache
Once you've got the files, you need to tell your machine where to find everything by configuring the source files. The easiest way is to accept all the defaults and just type:
setp2:
./configure --prefix=/home/soa/apache/apache2
To configure the source tree using all the default options, simply type ./configure. To change the default options, configure accepts a variety of variables and command line options.
The most important option is the location --prefix where Apache is to be installed later, because Apache has to be configured for this location to work correctly. More fine-tuned control of the location of files is possible with additional configure options.
As with any source installation, you'll then need to build the installation:
setp3:
make
make install
Customize Apache configuration
Assuming that there were no problems, you are ready to customize your Apache configuration. This really just amounts to editing the httpd.conf file. This file is located in the PREFIX/conf directory. I generally edit it with text editor.
vi PREFIX/conf/httpd.conf
setp4:
vi /home/soa/apache/apache2/bin/httpd.conf
by default we have 80 port.If we have custom port number we can change like below.
step5:
Navigate to apache_home/bin>
apache_home=/home/soa/apache/apache2
[soa@soa12c-12-1-3 bin]$ ./apachectl start
Open a web browser on the same machine and type http://192.168.0.21:8080/ in the address box. You should see a page similar to the one in the partial screen shot below.
No comments:
Post a Comment