Overview
You may need to start, stop or restart system services, such as Apache or MySQL, on your DV server. This can be for a variety of reasons.
- You may have updated a configuration for the service, and you need to restart the service for your changes to take effect.
- A service may be malfunctioning or "snowballing" and require a restart or a hard stop.
- A service may have crashed and require a start or restart.
In such situations, restarting only the relevant process is more graceful and less disruptive than rebooting your entire server.
Plesk instructions
These instructions are for Plesk Onyx 17.0.17. Earlier versions of Plesk may appear different, but the instructions for managing services should be similar. Media Temple recommends upgrading to the latest version of Plesk Onyx.
1. Log into the Plesk Control Panel.
4. You are now in the services management menu and can start/stop/restart as needed.

- Start - Green arrow
- Stop - Red square
- Restart - Yellow sun-circle
cPanel Instructions
Using WHM
The easiest way to restart services is through WHM.
1. Log in to WHM and locate Restart Services in the menu on the left.
2. Select the service that you'd like to restart and confirm.
Using the restartsrv_ script
The restartsrv_ script can be used to quickly restart services from the command line.
- SSH to your server and execute the following:
restartsrv_SomeService
- For instance, to restart the Apache web server:
restartsrv_apache
For a complete list of restartsrv_ commands, navigate to the official cPanel documentation found here.
SSH instructions
CentOS 7
CentOS 7 uses the systemctl command for service management.
1. Log into your server as a root or sudo user via SSH.
2. Use the systemctl command to control your services.
- To start, stop, restart, or check the status of services:
systemctl (action) service
- For instance, to check the status of the Nginx web-server:
systemctl status nginx
- It may also be helpful to view which processes are currently running:
ps aux
See the list of common services at the end of this article for additional information.
CentOS 5/6
Use either the service command or file path to manage your services.
1. Log into your server as a root or sudo user via SSH.- Service command syntax
service service name start/stop/reset/status
- File path syntax
/etc/init.d/service name start/stop/reset/status
- start
- stop
- restart
- status
The below example will restart Apache, or httpd, using the file path to the Apache daemon.
/etc/init.d/httpd restart
You should see output like:
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Any errors will also appear in the output. Read them carefully, or perform a search on the text of the error, for information on how to proceed.
In the below example, we are restarting MySQL using the service command.
service mysqld restart
List of common services
- Apache: httpd
- Runs your web server, including serving all HTML and PHP pages.
TIP:
You can restart Apache gracefully to provide a seamless user experience. Run this command:
/etc/init.d/httpd restart graceful
This will not work if you are trying to kill a runaway process. In that case, restart normally. For more information on graceful restarts, see Apache.org.
- MySQL: mysqld
- Runs your MySQL database server. Needed for many common content management systems.
- Cron: crond
- Runs scheduled tasks on your server, such as backups and log rotations.
- Firewall: iptables
- Your firewall rules.
- Nameservers: named
- Runs private nameservers. This service can safely be disabled if you are not running private nameservers.
Comments