Apache HTTP Server is an open source HTTP web server for Unix platforms (BSD, GNU/Linux, and UNIX systems), Microsoft Windows, and other platforms. The Apache HTTP Server is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation.
Note: Here I am installing apache2.2 on Red Hat Linux 5
Download the following rpms:
#wget http://www.apache.org/dist/httpd/binaries/rpm/i386/httpd-2.2.3-1.i386.rpm
#wget http://www.apache.org/dist/httpd/binaries/rpm/i386/httpd-devel-2.0.59-1.i386.rpm
#wget http://www.apache.org/dist/httpd/binaries/rpm/i386/httpd-manual-2.0.59-1.i386.rpm
Installation:
Type the following command if you are using Rhel, Fedora or Centos.
# rpm –ivh httpd-2.2.3-1.i386.rpm
# rpm –ivh httpd-devel-2.2.3-1.i386.rpm
# rpm –ivh httpd-manual-2.2.3-1.i386.rpm
You can also use yum command to install the same, but you will need yum repository for that
Running Apache:
Now we need to start httpd daemon to get it working
# /etc/init.d/httpd start
You can stop the server at any time by
# /etc/init.d/httpd stop
After making changes to the configuration file of apache, you will need to restart the server:
# /etc/init.d/httpd restart
To restart Apache without aborting current connections
#etc/init.d/httpd graceful
To Start Apache on system startup:
#chkconfig httpd on
After making changes in httpd.conf you can check the configuration syntax.
#etc/init.d/httpd configtest
Verify the Installation:
Open http://localhost in your browser, It will open following page.
If you can see this, it means that the installation of the Apache web server on this System was successful. Default document root for Apache is /var/www/html.You may now add content to this directory and replace this page.