How To Install Apache Server Source Package On Linux Server?

0 comments

How to install apache server source package on Linux server?

Step1 : Check if the package is installed or not

#find / -iname httpd.conf

If you did not find any thing related to apache by using above find command you can install the source package.

Step2 : We can install source package in /opt for our requirement. Download the package from apache software foundation site

#cd /opt

#wget http://mirror.cc.columbia.edu/pub/software/apache//httpd/httpd-2.2.17.tar.gz

Step3 : Uncompress it and change the directory to source directory

#tar xvfz httpd-2.2.17.tar.gz

#cd httpd-2.2.17

Step4 : Now compile the source code
#./configure

#make

#make install

Or

The above three commands can be clubbed together to save time

#./configure && make && make install

Note1 : All the configuration files related to apache are stored in /usr/local/apache2/ When we install the source package by default. But if we install it through package installation softwares such as rpm/yum/apt-get the configuration files are stored in /etc/httpd folder

Note2 : This is important and interview question too. Can we run two apache servers at a time?

Ans : The answer to this question is yes. And its possible if we use source package to install in two different locations say in /opt and /opt1 and the variable “Listen” is set to different. Ports for this two servers(Bit complex to understand. If you have any questions ask it at http://forums.linuxnix.com our new Linux/Unix forums not officially announced.

Step5 : Now start the service.

#/usr/local/apache2/bin/apachectl start

Step6 : Check if the web server is running or not by accessing local host

#elinks localhost

Or

Access localhost from browser

  • Like the post? Please Subscribe to free RSS feed to get updates
  • How To Install Apache Server On Ubuntu Machine?

    0 comments

    How to install an Apache Server on ubuntu machine(A debian system)?

    Step1 : Check if the package is installed or not

    #dpkg -l | grep apache

    This dpkg -l command is similar to rpm -qa command in Redhat linux to list all the applications installed in your system.

    Step2 : Install the package if you did not get any output

    #apt-get install apache*

    Step3 : Now start the apache service

    #service apache2 restart

    Step4 : On the service at booting time

    #chkconfig apache2 on

    Step5 : Check if the web server is running or not by accessing local host

    #elinks localhost

    Or

    Access localhost from browser

    Here is the screen shot showing the test web page when apache is installed

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Apache Server Installation On Redhat Linux

    0 comments

    How we can install Apache web server on Redhat linux?
    Ans : The simplest way to install Apache on redhat machine is to use yum command. 


    Follow below steps : 
    To install and check if the web server is running with default test page.


    Step1: Check if the package is installed or not


    #rpm -qa | grep httpd


    Step2 : Install the package if you did not get any output


    #yum install httpd


    Step3 : Now start the apache service


    #service httpd restart


    Step4 : On the service at booting time


    #chkconfig httpd on


    Step5 : Check if the web server is running or not by accessing local host


    #elinks localhost


    or 


    Access localhost from browser


    When you access the server through browser red-hat Linux will present you with a test page as shown below




  • Like the post? Please Subscribe to free RSS feed to get updates
  • Archive

    Translate this page

     

    The Linux Juggernaut | Copyright 2006-2009 Surendra Kumar Anne | Surendra's Home Page | Give us feedback how we are doing, Click here