1.配置php-fpm.conf
vi /usr/local/php/etc/php-fpm.conf
php-fpm.pid 目录必须指向:/usr/local/php/var/run/php-fpm.pid
2.拷贝php-fpm脚本至/etc/init.d目录
cp /home/soft/php-5.3.15/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
3.设置权限并启动php-fpm:
chmod 755 /etc/init.d/php-fpm
/etc/init.d/php-fpm start
chkconfig --add php-fpm
最后,给出php-fpm以服务的方式启动、停止和重启:
service php-fpm start
service php-fpm stop
service php-fpm reload