What is Apache?

    Apache is an open source  web server application which is widely used by many organizations. In this article we gonna see how to install and run apache on different distributors through direct installation.

Direct Installation:

RPM Machines:

    For RPM based machines such as centos,Fedora,etc.,. we can install it through yum

$ yum install httpd

    The above command will install default apache for RPM based machines. The default conf directory is /etc/httpd/conf/httpd.conf which contains all configuration statements. These statements don't need to be changed if its a basic installation.

    The web files are stored under the default path /var/www/html. This path can be modified according to users wish on httpd.conf at DocumentRoot.

DocumentRoot "/var/www/html"

To start the webserver run the below command,
               
$ /etc/init.d/httpd start

Debian machines:

    For Debian based machines such as Ubuntu,Mint,etc.,. we can install it through apt.

The command line to install apache in debian based machines,

$ apt-get install apache2

The default conf directory is  /etc/apache2/apache2.conf

To start the application,

$ /etc/init.d/apache2 start

    Now you have successfully installed Apache web server on your server. The apache will run on port 80 by default.

    On the upcoming articles will  see how to setup a virtual host or domain running on your server.

    Please comment if you have any questions.

Comments

  1. Be the first to add a comment.