+
1 4 4
  1. #1
    Status
    Offline
      Rise Company
    Engineering and Technology
    Apr 2014
    Egypt
    4,628
    10

    WHM/CPanel Restart All Service using Command Line


    WHM/CPanel restart whm all services
    Restart Services On a cPanel Server - Restart All Service using Command Line

    Restart cPanel Service using Command Line

    Did some changes on cPanel/WHM configs and want to restart the cPanel Service?
    This can be done using a single command from the root user of the WHM Server.
    Restarting cPanel will trigger the restart to all the services lik tail watch, MySQL server, etc on cPanel server.

    Procedure

    1. Log in to the root of the WHM Server.
    2. Run the following command to restart the cPanel Service.
      :
       service cpanel restart

    The above command with restart the cPanel service using terminal.

    ----------------------------------------------------
    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 cPanels 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 cPanels 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 servers bound IPv6 addresses.

    :
      /usr/local/cpanel/scripts/restartsrv cpipv6


    Restart cPanels cpsrvd daemon


    :
      /usr/local/cpanel/scripts/restartsrv cpsrvd


    Restart cPanels crond daemon


    :
      /usr/local/cpanel/scripts/restartsrv crond


    Restart cPanels 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


    Restartthe 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 cPanels TailWatch log processing service


    :
     /usr/local/cpanel/scripts/restartsrv tailwatchd 
    
    Restart the Apache Tomcat service 
    
    
    :
    /usr/local/cpanel/scripts/restartsrv tomcat


    Restart the Open-Spource Super-Server daemon


    :
     /usr/local/cpanel/scripts/restartsrv xinetd
    :
    https://docs.cpanel.net/whm/scripts/...artsrv-script/
    https://docs.cpanel.net/whm/server-s...ervice-status/
    https://www.basezap.com/restart-cpan...-command-line/
    https://blog.first2host.co.uk/restart-cpanel-services/
    ------------------------------------------------------------------------
    Rise Company for Engineering & Technology
    ------------------------------------------------------------------------
    Web Hosting | Web Designing | E-Marketing

    # 1 Business Services

    Web Hosting - Business Emails

    Web Design - Google Adwords

    www.rise.company | www.rise.company/emails

    :
    ! .



  2. #2
    Status
    Offline
      Rise Company
    Engineering and Technology
    Apr 2014
    Egypt
    4,628
    10

    : WHM/CPanel Restart All Service using Command L

    The restartsrv Script

    The /usr/local/cpanel/scripts/restartsrv script restarts a service.
    If a service wont restart from WHM, use this script to restart a service from the command line.

    Run the script

    To run this script on the command line, use the following format, where service is the services name:
    /usr/local/cpanel/scripts/restartsrv_service

    Use the following options with this script:
    Options Description Example
    check Checks whether the service is running. --check
    graceful Gracefully restart the service. --graceful
    hard Perform a hard stop and restart for the service. --hard
    notconfigured-ok The unconfigured service will exit with a non-fatal error. --notconfigured-ok
    reload Reload the service. --reload
    restart Perform a soft restart for the service. --restart
    start Start the service. --start
    stop Stop the service. --stop
    help Display the scripts help documentation. --help

    Services


    This script restarts the following services:

    • apache or httpd The Apache web server daemon.
    • apache_php_fpm The Apache PHP-FPM service.
    • bind The Berkeley Internet Name Domain (BIND) nameserver daemon.
    • chkservd or tailwatch cPanel & WHMs TailWatch log processing service.
    • clamd The ClamAV antivirus daemon.
    • cpanalysticsd The cPanel Analytics daemon.
    • cpanellogd The cPanel log and bandwidth processor daemon.
    • cpanel_ccs The cPanel Calendar and Contacts server service.
    • cpanel_dovecot_solr The Apache Solr service.
    • cpanel_php_fpm The cPanel PHP-FPM service.
    • cpdavd cPanel & WHMs WebDAV daemon.
    • cpgreylistd cPanels Greylisting.
    • cphulkd The cPHulk service.
    • cpipv6 Binds or rebinds the servers IPv6 addresses.
    • cpsrvd or cpanel The cPanel server daemon.
    • crond The Cron daemon. Note:
      While Debian systems (Ubuntu) use the cron daemon, you can use crond as the service name when running the script.
    • dnsadmin The cPanel Domain Name System (DNS) admin cache service.
    • dovecot The Dovecot mail server.
    • exim The Exim mail exchanger.
    • ftpd, ftpd, ftpmagic, or ftpserver The configured FTP service (ProFTPD or Pure-FTPd).
    • imap, pop, or pop3 The Dovecot Internet Mail Access Protocol (IMAP) daemon.
    • ipaliases The IP address aliasing software.
    • lmtp The Local Mail Transport Protocol (LMTP) service.
    • mailman The Mailman service.
    • mydns The MyDNS server. Important:
      We deprecated MyDNS in cPanel & WHM version 78. We strongly recommend that you use PowerDNS instead.
    • mysql or mysqld The MySQL service.
    • named The BIND nameserver daemon.
    • nscd The Name Service Cache service.
    • p0f The passive OS fingerprinting service.
    • pdns or powerdns The PowerDNS service.
    • postgres or postgresql The PostgreSQL database service.

    • proftpd The ProFTP server daemon.
    • pureftpd The Pure-FTPd server daemon.
    • queueprocd The TaskQueue Processor daemon.
    • rsyslog or rsyslogd The system log service that monitors the web server and system activity.
    • spamd The Apache SpamAssassin daemon.
    • sshd or openssh The Secure Shell (SSH) daemon.
    • tailwatchd or chkservd cPanels TailWatch log processing daemon.
    • tomcat The Apache Tomcat service.

    For more information about these services, read our cPanel & WHM Service Daemons documentation.

    Example


    To perform a hardrestart for a service, use the restart and hard options. For example, to perform a hard restart for the named service:
    /usr/local/cpanel/scripts/restartsrv_named --restart --hard

    :
    https://docs.cpanel.net/whm/scripts/...artsrv-script/

    ------------------------------------------------------------------------
    Rise Company for Engineering & Technology
    ------------------------------------------------------------------------
    Web Hosting | Web Designing | E-Marketing

    # 1 Business Services

    Web Hosting - Business Emails

    Web Design - Google Adwords

    www.rise.company | www.rise.company/emails

    :
    ! .



  3. #3
    Status
    Offline
      Rise Company
    Engineering and Technology
    Apr 2014
    Egypt
    4,628
    10

    : WHM/CPanel Restart All Service using Command L



    :
    /usr/local/cpanel/scripts/restartsrv_apache
    /usr/local/cpanel/scripts/restartsrv_apache_php_fpm
    /usr/local/cpanel/scripts/restartsrv_cpanel_php_fpm 
    /usr/local/cpanel/scripts/restartsrv_dnsadmin
    /usr/local/cpanel/scripts/restartsrv_mydns
    /usr/local/cpanel/scripts/restartsrv_mysql


    :
    echo 3 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'
    ------------------------------------------------------------------------
    Rise Company for Engineering & Technology
    ------------------------------------------------------------------------
    Web Hosting | Web Designing | E-Marketing

    # 1 Business Services

    Web Hosting - Business Emails

    Web Design - Google Adwords

    www.rise.company | www.rise.company/emails

    :
    ! .



  4. #4
    Status
    Offline
      Rise Company
    Engineering and Technology
    Apr 2014
    Egypt
    4,628
    10

    : WHM/CPanel Restart All Service using Command L


    services


    :
    /usr/local/cpanel/scripts/restartsrv_apache
    /usr/local/cpanel/scripts/restartsrv_apache_php_fpm
    /usr/local/cpanel/scripts/restartsrv_cpanel_php_fpm 
    /usr/local/cpanel/scripts/restartsrv_dnsadmin
    /usr/local/cpanel/scripts/restartsrv_mydns
    /usr/local/cpanel/scripts/restartsrv_mysql
    echo 3 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'
    ------------------------------------------------------------------------
    Rise Company for Engineering & Technology
    ------------------------------------------------------------------------
    Web Hosting | Web Designing | E-Marketing

    # 1 Business Services

    Web Hosting - Business Emails

    Web Design - Google Adwords

    www.rise.company | www.rise.company/emails

    :
    ! .



  1. : 6
    : 25-10-2021, 19:53
  2. WHM/CPanel Reset a DNS Zone
    Rise Company Rise Host
    : 0
    : 16-10-2021, 15:33
  3. CPanel CWP
    Rise Company Rise Host
    : 0
    : 24-08-2021, 12:43
  4. WHM/CPanel Historical CPU Usage
    Rise Company SSH / SFTP
    : 0
    : 09-08-2021, 23:42
  5. WHM/CPanel Historical RAM Usage
    Rise Company SSH / SFTP
    : 0
    : 09-08-2021, 23:39