Thursday, 7 June 2012

How to install Apache server in Linux

Apache is one of the most popular web servers in Linux.

Install Apache HTTP Server on Centos 

          [root@sysadmin ~]#  yum   install   httpd   httpd-devel

 Now start the service

         [root@sysadmin ~]#  /etc/init.d/httpd  start

Set the apache service to start on boot

         [root@sysadmin ~]#  chkconfig  httpd  on

How to upgrade Apache HTTP server on Centos

First stop the apache service

         [root@sysadmin ~]#  /etc/init.d/httpd  stop

Then take backup the Apache configuration file

         [root@sysadmin ~]#  cp   -p   /etc/httpd/conf/httpd.conf   /httpd.conf-bkp

Upgrade the Apache HTTP server

         [root@sysadmin ~]#  yum   upgrade   httpd

Now Restart the service

          [root@sysadmin ~]#  /etc/init.d/httpd  restart

No comments:

Post a Comment