php-fpm添加service服務

原文:http://blog.csdn.net/whatday/article/details/50659992php

php-fpm在5.3.2版本之後不支持service php-fpm start等命令,若是想要支持這些命令能夠作以下操做api

我使用源碼安裝的php5.6.30php-fpm

修改安裝目錄下的/www/php/etc/php-fpm.conf文件,把;pid = run/php-fpm.pid以前的‘;’去掉.net

把源碼包目錄下的init.d.php-fpm 拷貝到/etc/init.d/php-fpmrest

cp /www/software/php-5.6.30/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpmblog

設置執行權限源碼

chmod +x /etc/init.d/php-fpmit

添加服務service

chkconfig --add php-fpm權限

操做完之後能夠使用如下命令了

service php-fpm start

service php-fpm stop

service php-fpm restart

service php-fpm reload

相關文章
相關標籤/搜索