Saturday, November 7, 2009

Installing Apache 2.2.14 in Ubuntu

1.) Open the terminal window and log as root
        sudo su
    Then give root password and enter

2.) Next we have to update the package index. ( https://help.ubuntu.com/8.04/serverguide/C/apt-get.html ) The APT package index is essentially a database of available packages from the repositories defined in the /etc/apt/sources.list file. To update the local package index with the latest changes made in repositories, type the following:
    apt-get update

3.) Now you have to check whether you have installed gcc and make packages already in Ubuntu. ( http://ubuntuforums.org/showthread.php?t=261366 ) To check that run the following command
    dpkg --get-selections > installed-software

From above command they will create a list of what you have installed already in youe OS. After running that command you are not visible any changes in your terminal. Because that just create a file in your current position. So you have to run the bellow command to find where you are now.
    pwd
Next run the bellow command to open that file
    gedit /the_path_given_by_above_command/install-software
From that list you can check whether you have installe gcc and make packages already.

4.) If you are not installed gcc this is the command. We do this to get development tools. The importace of gcc ( http://en.wikipedia.org/wiki/GNU_Compiler_Collection ) is to compile various programs under GNU project.
    apt-get install gcc

5.) Then you have to install make package too. Why we install "make" ( http://en.wikipedia.org/wiki/Make_(software) ) , because make is a utility for automatically building executable programs and libraries from source code.
    apt-get install make

6.) Now you have to download the Apache source file. To do that visit this site ( http://httpd.apache.org/download.cgi ) and download the relavant stable version.

7.) This step is an extra thing that most of people don't follow but Apache developers thougherally ask to follow. That is verify that you have download the real source file. This can be check by using public key encryption process.
    If you are trying to check PGP method you have to install pgpgpg package first.
    apt-get install pgpgpg

8.) Next thing we have to do is extract the downloaded source directory. To do that go to the downloaded directory by using
    cd /path_to_the_directory_where_you_save_the_source/
command and then give bellow command
    tar zxvf file_name
In here z stands for "filter the archive through gzip", x stands for "extract files from an archive" v stands for "verbosely list files processed" and f stands for "use archive file"

9.) Then you have to go into extracted directory and configure. The next step is to configure the Apache source tree for your particular platform and personal requirements. To configure, give this command
    ./configure --prefix=/user/local/apache2.2.14

10.) Now you can build the various parts which form the Apache package by simply running the command
    make
The time taken to process depend on your computer power as well as the modules that you have choosed to configure above command.

11.) Now it's time to install the package under the configured installation /user/local/apache2.2.14 The command is
    make install
After running this command some directories and files will create on that given path.

12.) Now the basics are over. Now you can customize it. To do that go into /user/local/apache2.2.14./conf/ directory and open httpd.conf file and customize.

13.) Now you can start your Apache HTTP server by immediately running
    /usr/local/apache2.2.14/bin/apachectl start
Then open a web browser and type http://127.0.1.1 in the browser address bar.
You can stop apache server by running following command
    /usr/local/apache2.2.14/bin/apachectl stop


                    *** That's it.***

*** Further Editing in httpd.conf file will be later ***

            THANK YOU...


2 comments:

  1. HI nice post but i want to know which modules are most important and core when installing apache source? since lots of modules are present in apache some are enabled by default and some others not... and whats the difference b/w installing the module as static and as shared whats the difference please reply if u know as soon as possible. my blog is http://beautiful-tourist-places.blogspot.com plz leave reply

    ReplyDelete
  2. We create an unique Natural herbal extracts with functionality that can be used to promote health and beauty.

    ReplyDelete