php使用php-fpm重启、终止操作命令

WBOY
Release: 2016-06-13 11:53:10
Original
899 people have browsed it

php使用php-fpm重启、停止操作命令

php 5.3.3 源码中已经内嵌了 php-fpm,不用象以前的php版本一样专门打补丁了,只需要在configure的时候添加编译参数即可。

关于php-fpm的编译参数有 –enable-fpm –with-fpm-user=www –with-fpm-group=www –with-libevent-dir=libevent位置。

但是,php 5.3.3 下的php-fpm 不再支持 php-fpm 以前具有的 /usr/local/php/sbin/php-fpm (start|stop|reload)等命令,需要使用信号控制:

master进程可以理解以下信号:

SIGINT, SIGTERM 立刻终止?
SIGQUIT 平滑终止?
SIGUSR1 重新打开日志文件?
SIGUSR2 平滑重载所有worker进程并重新载入配置和二进制模块

示例:?
php-fpm 关闭:?
kill -SIGINT `cat /usr/local/php/var/run/php-fpm.pid`?
php-fpm 重启:?
kill -SIGUSR2 `cat /usr/local/php/var/run/php-fpm.pid`

查看php-fpm进程数:

ps aux | grep -c php-fpm

netstat -anpo | grep "php-cgi" | wc -l

netstat -anop | grep "php-fpm" | wc -l

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template