#测试php-fpm配置是否正确 liondeMacBook-Pro:bin lion$ php-fpm -t [14-Aug-2014 16:14:30] NOTICE: configuration file /usr/local/etc/php/5.5/php-fpm.conf test is successful liondeMacBook-Pro:bin lion$ php-fpm -c /usr/local/etc/php/5.5/php.ini -y /usr/local/etc/php/5.5/php-fpm.conf -t [14-Aug-2014 16:14:48] NOTICE: configuration file /usr/local/etc/php/5.5/php-fpm.conf test is successful #启动php-fpm liondeMacBook-Pro:bin lion$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php55.plist #查看9000端口是否在运行 liondeMacBook-Pro:bin lion$ lsof -i:9000 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME php-fpm 51241 lion 8u IPv4 0xce9d0f6417637937 0t0 TCP localhost:cslistener (LISTEN) php-fpm 51243 lion 0u IPv4 0xce9d0f6417637937 0t0 TCP localhost:cslistener (LISTEN) php-fpm 51244 lion 0u IPv4 0xce9d0f6417637937 0t0 TCP localhost:cslistener (LISTEN) php-fpm 51245 lion 0u IPv4 0xce9d0f6417637937 0t0 TCP localhost:cslistener (LISTEN) #关闭掉php-fpm进程,再查看9000端口,没有监听了 liondeMacBook-Pro:bin lion$ ps aux|grep php-fpm|grep -v 'grep'|awk '{print $2}'|xargs kill -9 liondeMacBook-Pro:bin lion$ lsof -i:9000 liondeMacBook-Pro:bin lion$
设置PHP-FPM开机运行(其实在安装完成的提示中,也有说明):
ln -sfv /usr/local/opt/php55/*.plist ~/Library/LaunchAgents launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php55.plist
您可能感兴趣的文章: