السي بانال 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
- Log in to the root of the WHM Server.
- 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 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
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 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-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/
رد: السي بانال WHM/CPanel كيفية عمل ريستارت لجميع Restart All Service using Command L
The restartsrv Script
The /usr/local/cpanel/scripts/restartsrv script restarts a service.
If a service won’t 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
service’s 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 script’s 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 & WHM’s 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 & WHM’s WebDAV daemon.
- cpgreylistd — cPanel’s Greylisting.
- cphulkd — The cPHulk service.
- cpipv6 — Binds or rebinds the server’s 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 — cPanel’s TailWatch log processing daemon.
- tomcat — The Apache Tomcat® service.
رد: السي بانال 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'
رد: السي بانال 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'