Home > Article > Operation and Maintenance > How to turn on and off php-fpm under linux
So the way of starting, shutting down and reloading is different from before, you need to use signal control:
php-fpm master process can understand the signal:
sigint, sigterm terminate immediately
sigquit Smooth termination
sigusr1 Reopen the log file
sigusr2 Smoothly reload all worker processes and reload configuration and binary modules
For example:
Close php- fpm
kill -sigint `cat /usr/local/php/var/run/php-fpm.pid`
php-fpm Restart
ill -sigusr2 `cat /usr/local/php/var/run/php-fpm.pid`
Note: /usr/local/php/var/run/php-fpm.pid refers to the file that stores the master process number. This is the default address. It can be modified in the configuration. In addition, you can use the ps command to find the master's process number, and then use the kill signal process number.
Linux versions include: Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu and other versions. Among them, Deepin is one of the best-developed Linux distributions in China; Ubuntu Kylin is a derivative distribution based on Ubuntu; Manjaro is a Linux distribution based on Arch; LinuxMint's default Cinnamon desktop is similar to Windows XP and is simple and easy to use; Ubuntu is a desktop application Mainly Linux operating system.
The above is the detailed content of How to turn on and off php-fpm under linux. For more information, please follow other related articles on the PHP Chinese website!