知識庫

The restartsrv Scripts  列印本文

Overview:

The /usr/local/cpanel/scripts/restartsrv_* scripts restart services. If a service won’t restart from WHM, use one of these scripts to restart a service from the command line.

Run a script

To run a restart script on the command line, use the following format:

/usr/local/cpanel/scripts/restartsrv_service options

Services

You can restart the following services

  • apache — Restarts the Apache® web server.
  • apache_php_fpm — Restarts the Apache PHP-FPM service.
  • bind — Restarts the BIND nameserver software.
  • chkservd — Restarts cPanel & WHM’s TailWatch log processing service.
  • clamd — Restarts the ClamAV® antivirus daemon.
  • cpanalysticsd — Restarts the cPanel Analytics daemon.
  • cpanellogd — Restarts the cpanellogd daemon.
  • cpanel_dovecot_solr — Restarts the Apache Solr™ service.
  • cpanel_php_fpm — Restarts the cPanel PHP-FPM service.
  • cpdavd — Restarts cPanel & WHM’s WebDAV server.
  • cpgreylistd — Restarts the cPanel Greylisting daemon.
  • cphulkd — Restarts cPHulk.
  • cpipv6 — Binds or rebinds the server’s IPv6 addresses.
  • cpsrvd — Restarts the cpsrvd daemon.
  • crond — Restarts the crond daemon.
  • dnsadmin — Restarts the dnsadmin daemon.
  • dovecot — Restarts the Dovecot® mail server.
  • exim — Restarts the Exim mail exchanger.
  • eximstats — Restarts the Eim mail statistics tracker.
  • ftpd or ftpserver — Restarts the configured FTP service (ProFTPD or Pure-FTPd).
  • httpd — Restarts the Apache web server.
  • imap or lmtp or pop3 — Restarts the IMAP server (Dovecot).
  • inetd — Restarts the super-server daemon that manages Internet services.
  • ipaliases — Restarts the IP address aliasing software.
  • mailman — Restarts the Mailman service.
  • mydns — Restarts the MyDNS server.

    Important:

    We deprecated MyDNS in cPanel & WHM version 78. We strongly recommend that you use PowerDNS instead.

     

  • named — Restarts the BIND nameserver software.

  • nscd — Restarts the Name Service Cache daemon.

  • p0f — Restarts the passive OS fingerprinting service.

  • pdns or powerdns — Restarts the PowerDNS service.

  • postgres or postgresql — Restarts the PostgreSQL® database service.

  • proftpd — Restarts the ProFTP server daemon.

  • pureftpd — Restarts the Pure-FTP server daemon.

  • queueprocd — Restarts the queue processing daemon.

  • rsyslog — Restarts the open-source log forwarder daemon.

  • spamd — Restarts the Apache SpamAssassin™ daemon.

  • sshd — Restarts the Secure Shell (SSH) daemon.

  • syslogd — Restarts the log forwarder daemon.

  • tailwatchd — Restarts cPanel’s TailWatch log processing service.

  • tomcat — Restarts the Apache Tomcat® service.

    Important:

    As of cPanel & WHM version 76, EasyApache 4 now supports Tomcat 8.5. For more information, read our Introduction to Tomcat documentation.

     

  • xinetd — Restarts the open-source super-server daemon.

Options

You can use the following options when you restart a service:

  • --check — Checks whether the service is running.
  • --graceful — Gracefully restart a service.
  • --hard — Performs a hard stop and restart for a service.
  • --notconfigured-ok — Services that you did not configure will exit with a non-fatal error.
  • --reload — Reload a service.
  • --restart — Restart a service.
  • --start — Start a service.
  • --stop — Stop a service.

Example

To gracefully restart the cpsrvd daemon, run the following command:

/usr/local/cpanel/scripts/restartsrv_cpsrvd --graceful

這篇文章有幫助嗎?

相關文章

WHM Scripts
Overview: The cPanel & WHM installation process adds important scripts to your server’s...
The dbmaptool Script
Overview: You can use the /usr/local/cpanel/bin/dbmaptool script to grant ownership of databases...
The servers_queue Script
Overview: This script allows you to manage the task queue system. The task queue system allows...
The auto-adjust-mysql-limits Script
Overview: The /usr/local/cpanel/scripts/auto-adjust-mysql-limits script updates MySQL®...
The autossl_check Script
Overview: The /usr/local/cpanel/bin/autossl_check script allows you to manually check the SSL...