How to start/ stop Linux services?
Now lets see how to start or stop a service.Status of a Service:
Before starting or stoping a service, first check the status of the service. Suppose if we want to start a httpd service, lets first check the status of the service like:
/etc/rc.d/init.d/httpd status httpd is stopped
From the above example, we can see the status of the service httpd is stopped.Start a Service
After checking the status, now we can proceed to start a service.
/etc/rc.d/init.d/httpd start Starting httpd:
[ OK ]
The above one will start the httpd server.Stop a Service
If we want to stop a service, we can check the status of the service and proceed to stop a service.
/etc/rc.d/init.d/httpd stop Stopping httpd:
[ OK ]
This command will stop the httpd server.