How to reload service by using kill command

How to reload service by using kill command

In my  case I am  using apache server  for reloading configuration file etc.

*Check  apache is runnig on 80 port or  not ?

root@indiangnu.org:/home/arun# netstat -nlp |  grep  80
tcp6       0      0 :::80                   :::*                    LISTEN     5562/apache2

root@indiangnu.org:/home/arun# vi /etc/apache2/
apache2.conf     envvars          magic            mods-enabled/    README           sites-enabled/
conf.d/          httpd.conf       mods-available/  ports.conf       sites-available/ ssl/

2]  Modify  configuration files..

root@indiangnu.org:/home/arun# cat  /etc/apache2/ports.conf
Listen 80

root@indiangnu.org:/home/arun#  vi  /etc/apache2/ports.conf

root@indiangnu.org:/home/arun#  cat  /etc/apache2/ports.conf
Listen 80
Listen 8080

root@indiangnu.org:/home/arun#

root@indiangnu.org:/home/arun# netstat -nlp |  grep  80
root@indiangnu.org:/home/arun# netstat -nlp |  grep  80
tcp6       0      0 :::80                   :::*                    LISTEN     5562/apache2

3]  Reload service ie configuration files etc.

root@indiangnu.org:/home/arun# kill -HUP 5562

4]  Check apache is using 80 and 8080 port or not ?

root@indiangnu.org:/home/arun# netstat -nlp |  grep  80
tcp6       0      0 :::8080                 :::*                    LISTEN     5562/apache2
tcp6       0      0 :::80                   :::*                    LISTEN     5562/apache2
root@indiangnu.org:/home/arun#

Similar Posts:

Be Sociable, Share!

Leave a Reply

Your email address will not be published. Required fields are marked *