php 5.3.3 源碼中已經(jīng)內(nèi)嵌了 php-fpm,不用象以前的php版本一樣專(zhuān)門(mén)打補(bǔ)丁了,只需要在configure的時(shí)候添加編譯參數(shù)即可。
關(guān)于php-fpm的編譯參數(shù)有 –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)等命令,需要使用信號(hào)控制:
master進(jìn)程可以理解以下信號(hào):
SIGINT, SIGTERM 立刻終止
SIGQUIT 平滑終止
SIGUSR1 重新打開(kāi)日志文件
SIGUSR2 平滑重載所有worker進(jìn)程并重新載入配置和二進(jìn)制模塊
示例:
php-fpm 關(guān)閉:
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進(jìn)程數(shù):
ps aux | grep -c php-fpm
netstat -anpo | grep "php-cgi" | wc -l
netstat -anop | grep "php-fpm" | wc -l
聯(lián)系客服