/usr/local/php/sbin/php-fpm --help
-c <path>|<file> Look for php.ini file in this directory 指定使用的php.ini配置
-y, --fpm-config <file> Specify alternative path to FastCGI process manager config file 指定php-fpm.conf
-t, --test Test FPM configuration and exit 检查测试php-fpm.conf文件 并退出
示例 检测配置文件(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
启动php-fpm
/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-fpmkill -USR2 `cat /usr/local/php/var/run/php-fpm.pid`如果没有生成php-fpm.pid
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 phpkill -USR2 46001
到php-fpm.conf里
[global]
; Pid file; Note: the default prefix is /usr/local/php/var; Default Value: none;pid = run/php-fpm.pid把pid的注释解开即可