How to Start, Stop and Restart Services on Linux Dedicated Server

The two different kind of programs running in Linux dedicated servers, one which needs user interaction and another which execute tasks without user involvement. The programs that run tasks in the background are normally known as “services” and “daemons”.

Basically, there are several services required on servers to run the background like DB Server, Firewall, Web Server, DNS System, Mail Server, etc… Due to these various services, it is very much necessary to know the exact process of starting, stopping and restarting the services.

The process of being, start, stop and restart the services get change as per the linux distributions. So in this article we will study about how to start, stop and restart services in CentOS Dedicated Server.

The two different methods through which you can start, stop and restart any desired service are as follow:

How to Start a Service?

First Method:
/etc/init.d/service-name start

Second Method:
service service-name start

How to Stop a service?

First Method:
/etc/init.d/service-name stop

Second Method:
service service-name stop

How to Check the Status of a Service: (whether it is running or not)

First Method:
/etc/init.d/service-name status

Second Method:
service service-name status

How to restart a service on dedicated server?

First Method:
/etc/init.d/service-name restart

Second Method:
service service-name restart

It might be possible that few services may have additional command settings. To find the available ones, enter:

First Method:
/etc/init.d/rsync [start, stop, reload, force-reload, restart, status]

Second Method:
service rsync

Leave a Reply