Home > Article > Backend Development > what is php stop command
The php stop command is "kill -INT `cat /usr/local/php/var/run/php-fpm.pid", and the restart command of "php-fpm" is "kill -USR2 `cat / usr/local/php/var/run/...".
Recommended: "PHP Video Tutorial"
About the startup of nginx, mysql, php, etc. under the linux system, Stop and restart commands.
/usr/local/nginx/sbin/nginx /etc/init.d/mysql start /usr/local/php/sbin/php-fpm start #nginx命令 start: /usr/local/nginx/sbin/nginx stop: /usr/local/nginx/sbin/nginx -s stop reload: /usr/local/nginx/sbin/nginx -s reload #******************************************** #php-fpm(fast-cgi)命令 start: /usr/local/php/sbin/php-fpm stop: /bin/ps -ef | grep 'php-fpm' | grep -v grep | cut -c 9-15 | xargs kill -9
Linux: PHP 5.3.3 or above version of php-fpm restart
INT, TERM: Immediately Terminate
QUIT: Graceful termination
USR1: Reopen log file
USR2: Gracefully reload all worker processes and reload configuration and binary modules
Example:
1) php-fpm shutdown:
kill -INT `cat /usr/local/php/var/run/php-fpm.pid`
2) php-fpm restart:
kill -USR2 `cat /usr/local/php/var/run/php-fpm.pid`
View the number of php-fpm processes:
ps aux | grep -c php-fpm #******************************************** #mysql命令 start: /etc/init.d/mysqld start stop: /etc/init.d/mysqld stop restart: /etc/init.d/mysqld restart #******************************************** #tomcat命令 start: /usr/local/tomcat/bin/startup.sh stop: /bin/ps -ef | grep 'tomcat' | grep -v grep | cut -c 9-15 | xargs kill -9
The above is the detailed content of what is php stop command. For more information, please follow other related articles on the PHP Chinese website!