/usr/local/php/sbin/php-fpm --helpphp
-c <path>|<file> Look for php.ini file in this directory 指定使用的php.ini配置centos
-y, --fpm-config <file> Specify alternative path to FastCGI process manager config file 指定php-fpm.confbash
-t, --test Test FPM configuration and exit 檢查測試php-fpm.conf文件 並退出php-fpm
示例 檢測配置文件(php-fpm)測試
/usr/local/php/sbin/php-fpm
-t
/usr/local/php/sbin/php-fpm
-c
/usr/local/php/etc/php
.ini -y
/usr/local/php/etc/php-fpm
.conf -t
/usr/local/php/sbin/php-fpm 不指定的話找默認配置
/usr/local/php/sbin/php-fpm
-c
/usr/local/php/etc/php
.ini -y
/usr/local/php/etc/php-fpm
.conf
#關閉php-fpm
kill -INT `cat /usr/local/php/var/run/php-fpm.pid` 或者ps -ef|grep php-fpm找出進程號
#重啓php-fpm
kill -USR2 `cat /usr/local/php/var/run/php-fpm.pid`this
若是沒有生成php-fpm.pidspa
root@centos1 run]# ps -ef|grep php
root 46001 1 0 21:56 ? 00:00:00 php-fpm: master process (/usr/local/php/etc/php-fpm.conf)
nobody 46002 46001 0 21:56 ? 00:00:00 php-fpm: pool www
nobody 46003 46001 0 21:56 ? 00:00:00 php-fpm: pool www
root 46018 45301 0 21:59 pts/2 00:00:00 grep phpcode
kill -USR2 46001進程
到php-fpm.conf裏ci
[global]
; Pid file
; Note: the default prefix is /usr/local/php/var
; Default Value: none
;pid = run/php-fpm.pid
把pid的註釋解開便可