Restart Services On a cPanel/WHM Server Print

  • 0

How to restart services on a cPanel / WHM server

cPanel and WHM is essentially a large number of different programs all running under a single graphical interface. The interface will invoke scripts when specific functions are done inside the software. If you click the restart ssh link inside WHM for example that will call the restart function for your ssh server which is the command /usr/local/cpanel/scripts/restartsrv sshd . This guide provides a list of all available services that can be restarted manually from the command line. You should always attempt to first restart services using the /usr/local/cpanel/scripts/restartsrv. If this does not work you can attempt to force services to restart using /etc/rc.d/init.d/ for CentOS 6 or systemctl restart service-name.service for CentOS 7 cPanel servers.

Restart services in the WHM interface

Unless problems prevent this, you can restart most services in WHM’s Restart Services interface (Home >> Restart Services).

Restart cPanel services using the /usr/local/cpanel/scripts/restartsrv script

If a service will not restart from WHM, then you can use the /usr/local/cpanel/scripts/restartsrv service command to attempt to restart the service from the command line. When you run this command, replace service with the correct value for that service, we have included all of the possible services you can restart with this script below with an example

Restart Apache on a cPanel Server
/usr/local/cpanel/scripts/restartsrv apache
Restart Bind on a cPanel Server
/usr/local/cpanel/scripts/restartsrv bind
Restart cPanel’s TailWatch log processing service
/usr/local/cpanel/scripts/restartsrv chkservd
Restart ClamAV on a cPanel Server
/usr/local/scpanel/scripts/restartsrv clamd
Restart the cPanel Log Daemon
/usr/local/scpanel/scripts/restartsrv cpanellogd
Restart cPanel’s WebDav Server
/usr/local/scpanel/scripts/restartsrv cpdavd
Restart cPHulk
/usr/local/scpanel/scripts/restartsrv cphulk
Rebind IPv6 Addresses

Run this script with the –list flag to list all of the server’s bound IPv6 addresses.

/usr/local/cpanel/scripts/restartsrv cpipv6
Restart cPanel’s cpsrvd daemon
/usr/local/cpanel/scripts/restartsrv cpsrvd
Restart cPanel’s crond daemon
/usr/local/cpanel/scripts/restartsrv crond
Restart cPanel’s dnsadmin daemon
/usr/local/cpanel/scripts/restartsrv dnsadmin
Restart the Dovecot mail server
/usr/local/cpanel/scripts/restartsrv dovecot
Restart the Entropy chat client
/usr/local/cpanel/scripts/restartsrv entropychat
Restart Exim
/usr/local/cpanel/scripts/restartsrv exim
Restart Exim Mail Statistics Tracker
/usr/local/cpanel/scripts/restartsrv eximstats
Restart FTP on a cPanel Server
/usr/local/cpanel/scripts/restartsrv ftpd or ftpserver
Restart the Apache Web Server
/usr/local/cpanel/scripts/restartsrv httpd
Restart IMAP on a cPanel Server
/usr/local/cpanel/scripts/restartsrv imap
Restart inetd (super-server) on a cPanel Server
/usr/local/cpanel/scripts/restartsrv inetd
Restart the IP Address aliasing software 
/usr/local/cpanel/scripts/restartsrv ipaliases
Restart the Mailman Server
/usr/local/cpanel/scripts/restartsrv mailman
Restart the MyDNS Server
/usr/local/cpanel/scripts/restartsrv mydns
Restart the MySQL Database Server
/usr/local/cpanel/scripts/restartsrv mysql
Restart the BIND Nameserver Software
/usr/local/cpanel/scripts/restartsrv named
Restart the NSD Nameserver daemon
/usr/local/cpanel/scripts/restartsrv nsd
Restart the Passive OS Fingerprinting Service
/usr/local/cpanel/scripts/restartsrv p0f
Restart the PostgreSQL Database Service
/usr/local/cpanel/scripts/restartsrv postgres or postgresql
Restart the Queueprocd daemon
/usr/local/cpanel/scripts/restartsrv queueprocd
Restart the Open-Source Lod daemon
/usr/local/cpanel/scripts/restartsrv rsyslogd
Restart the Apache Spam Assassin™ daemon
/usr/local/cpanel/scripts/restartsrv spamd
Restart SSH on a cPanel Server
/usr/local/cpanel/scripts/restartsrv sshd
Restart the Log forwarder daemon
/usr/local/cpanel/scripts/restartsrv syslogd
Restart cPanel’s TailWatch log processing service
/usr/local/cpanel/scripts/restartsrv tailwatchd
Restart the Apache Tomcat service
/usr/local/cpanel/scripts/restartsrv tomcat
Restart the Open-Source Super-Server daemon
/usr/local/cpanel/scripts/restartsrv xinetd

Restart cPanel Services – Direct service restart

If the /usr/local/cpanel/scripts/restartsrv script does not restart the service, you can attempt to restart the service directly. For servers that run CentOS, CloudLinux™, or Red Hat® Enterprise Linux (RHEL) 5 or 6 run the following command, where “service” is the path to the service:

/etc/rc.d/init.d/service restart

For servers that run CentOS 7, CloudLinux 7, or RHEL 7 run the following command, where service-name is the service that you wish to restart:

systemctl restart service-name.service

NOTE – If you use IPv6, the service network restart command will remove the IPv6 addresses from the network device. To restart your IPv6 configuration after you run the service network restart command, you must run the appropriate command for your version of cPanel & WHM:

  • For cPanel & WHM version 11.52 and earlier, run the /etc/init.d/cpipv6 restart command after you restart the network service.
  • For cPanel & WHM version 54 and later, run the /scripts/restartsrv_cpipv6 command after you restart the network service.

Was this answer helpful?

« Back

Send Message