Sometimes, you may want to restart services (like exim, httpd etc.) on your cPanel web server.
cPanel recommends for CentOS 7 to use a command like:
systemctl [restart|start|stop|status] service-name.service
Example1. Check the status of the Exim server:
root@web [~]# systemctl status exim.service * exim.service - Exim is a Mail Transport Agent, which is the program that moves mail from one machine to another. Loaded: loaded (/etc/systemd/system/exim.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2017-05-01 07:51:39 EDT; 1 months 7 days ago Main PID: 12081 (exim) CGroup: /system.slice/exim.service `-12081 /usr/sbin/exim -bd -q60m -oP /var/spool/exim/exim-daemon.pid Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable. root@web [~]#
Example2. Restart the Exim server:
root@web [~]# systemctl restart exim.service root@web [~]#
Notice that no output will be displayed if everything is fine.
Common used cPanel services are:
If you prefer, you can restart common services via WHM:
- Log into your WHM account
- Navigate to Restart Services.
- Click on the service icon you want to restart
- Click the Yes button when WHM will ask Are you sure you wish to restart this service?
- You will see a short restart log.