{"id":1183,"date":"2012-12-20T23:05:22","date_gmt":"2012-12-20T15:05:22","guid":{"rendered":"http:\/\/www.strongd.net\/?p=1183"},"modified":"2012-12-20T23:05:22","modified_gmt":"2012-12-20T15:05:22","slug":"php-5-3-3-%e4%b8%ad%e7%9a%84php-fpm%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/www.strongd.net\/?p=1183","title":{"rendered":"php 5.3.3 \u4e2d\u7684php-fpm\u914d\u7f6e"},"content":{"rendered":"<p>php 5.3.3 \u6e90\u7801\u4e2d\u5f00\u59cb\u5305\u542b php-fpm\uff0c\u4e0d\u7528\u4e13\u95e8\u518d\u6253\u8865\u4e01\u4e86\uff0c\u53ea\u9700\u8981\u89e3\u5f00\u6e90\u7801\u76f4\u63a5configure\uff0c\u5173\u4e8ephp-fpm\u7684\u7f16\u8bd1\u53c2\u6570\u6709 \u2013enable-fpm \u2013with-fpm-user=www \u2013with-fpm-group=www \u2013with-libevent-dir=libevent\u4f4d\u7f6e\u3002<\/p>\n<p>\u8fd9\u4e2aphp-fpm \u4e0d\u518d\u652f\u6301 php-fpm \u8865\u4e01\u5177\u6709\u7684 \/usr\/local\/php\/sbin\/php-fpm (start|stop|reload)\u7b49\u547d\u4ee4\uff0c\u9700\u8981\u4f7f\u7528\u4fe1\u53f7\u63a7\u5236\uff1a<\/p>\n<p>master\u8fdb\u7a0b\u53ef\u4ee5\u7406\u89e3\u4ee5\u4e0b\u4fe1\u53f7<\/p>\n<p>SIGINT, SIGTERM \u7acb\u523b\u7ec8\u6b62<br \/>\nSIGQUIT \u5e73\u6ed1\u7ec8\u6b62<br \/>\nSIGUSR1 \u91cd\u65b0\u6253\u5f00\u65e5\u5fd7\u6587\u4ef6<br \/>\nSIGUSR2 \u5e73\u6ed1\u91cd\u8f7d\u6240\u6709worker\u8fdb\u7a0b\u5e76\u91cd\u65b0\u8f7d\u5165\u914d\u7f6e\u548c\u4e8c\u8fdb\u5236\u6a21\u5757<\/p>\n<p>\u793a\u4f8b\uff1a<br \/>\nphp-fpm \u5173\u95ed\uff1a<br \/>\nkill -SIGINT `cat \/usr\/local\/php\/var\/run\/php-fpm.pid`<br \/>\nphp-fpm \u91cd\u542f\uff1a<br \/>\nkill -SIGUSR2 `cat \/usr\/local\/php\/var\/run\/php-fpm.pid`<\/p>\n<p>\u5176\u6b21\u914d\u7f6e\u6587\u4ef6\u4e0d\u518d\u4f7f\u7528\u7684xml \u683c\u5f0f\uff0c\u6539\u4e3a\u4e86INI\uff0c\u4f46\u662f\u914d\u7f6e\u53c2\u6570\u51e0\u4e4e\u548c\u4ee5\u524d\u4e00\u6837\uff0c\u53ef\u53c2\u7167xml\u683c\u5f0f\u7684\u683c\u5f0f\u914d\u7f6e\u3002<\/p>\n<p><strong>\u2014\u2014\u2014\u2014\u2014-\u8865\u5145\u5185\u5bb9\u2014\u2014\u2014\u2014\u2014-<\/strong><br \/>\nphp-fpm\u7684\u542f\u52a8\uff1a<\/p>\n<pre>cp -f (php -5.3.x-source-dir)\/sapi\/fpm\/init.d.php-fpm \/etc\/init.d\/php-fpm\r\nchmod 755 \/etc\/init.d\/php-fpm\r\n\/etc\/init.d\/php-fpm start\r\n\/sbin\/chkconfig --add php-fpm (\u6dfb\u52a0\u5230\u5f00\u673a\u670d\u52a1\u5217\u8868)\r\n\/sbin\/chkconfig php-fpm on<\/pre>\n<p>php-fpm\u7684\u542f\u52a8\u3001\u505c\u6b62\u548c\u91cd\u542f\uff1a<br \/>\n\/etc\/init.d\/php-fpm start<br \/>\n\/etc\/init.d\/php-fpm stop<br \/>\n\/etc\/init.d\/php-fpm reload<\/p>\n","protected":false},"excerpt":{"rendered":"<p>php 5.3.3 \u6e90\u7801\u4e2d\u5f00\u59cb\u5305\u542b php-fpm\uff0c\u4e0d\u7528\u4e13\u95e8\u518d\u6253\u8865\u4e01\u4e86\uff0c\u53ea\u9700\u8981\u89e3\u5f00\u6e90\u7801\u76f4\u63a5configure\uff0c\u5173\u4e8ephp-fpm\u7684\u7f16\u8bd1\u53c2\u6570\u6709 \u2013enable-fpm \u2013with-fpm-user=www \u2013with-fpm-group=www \u2013with-libevent-dir=libevent\u4f4d\u7f6e\u3002 \u8fd9\u4e2aphp-fpm \u4e0d\u518d\u652f\u6301 php-fpm \u8865\u4e01\u5177\u6709\u7684 \/usr\/local\/php\/sbin\/php-fpm (start|stop|reload)\u7b49\u547d\u4ee4\uff0c\u9700\u8981\u4f7f\u7528\u4fe1\u53f7\u63a7\u5236\uff1a master\u8fdb\u7a0b\u53ef\u4ee5\u7406\u89e3\u4ee5\u4e0b\u4fe1\u53f7 SIGINT, SIGTERM \u7acb\u523b\u7ec8\u6b62 SIGQUIT \u5e73\u6ed1\u7ec8\u6b62 SIGUSR1 \u91cd\u65b0\u6253\u5f00\u65e5\u5fd7\u6587\u4ef6 SIGUSR2 \u5e73\u6ed1\u91cd\u8f7d\u6240\u6709worker\u8fdb\u7a0b\u5e76\u91cd\u65b0\u8f7d\u5165\u914d\u7f6e\u548c\u4e8c\u8fdb\u5236\u6a21\u5757 \u793a\u4f8b\uff1a php-fpm \u5173\u95ed\uff1a kill -SIGINT `cat \/usr\/local\/php\/var\/run\/php-fpm.pid` php-fpm \u91cd\u542f\uff1a kill -SIGUSR2 `cat \/usr\/local\/php\/var\/run\/php-fpm.pid` \u5176\u6b21\u914d\u7f6e\u6587\u4ef6\u4e0d\u518d\u4f7f\u7528\u7684xml \u683c\u5f0f\uff0c\u6539\u4e3a\u4e86INI\uff0c\u4f46\u662f\u914d\u7f6e\u53c2\u6570\u51e0\u4e4e\u548c\u4ee5\u524d\u4e00\u6837\uff0c\u53ef\u53c2\u7167xml\u683c\u5f0f\u7684\u683c\u5f0f\u914d\u7f6e\u3002 \u2014\u2014\u2014\u2014\u2014-\u8865\u5145\u5185\u5bb9\u2014\u2014\u2014\u2014\u2014- php-fpm\u7684\u542f\u52a8\uff1a cp -f (php -5.3.x-source-dir)\/sapi\/fpm\/init.d.php-fpm \/etc\/init.d\/php-fpm chmod 755 \/etc\/init.d\/php-fpm \/etc\/init.d\/php-fpm start \/sbin\/chkconfig &#8211;add php-fpm (\u6dfb\u52a0\u5230\u5f00\u673a\u670d\u52a1\u5217\u8868) &hellip; <a href=\"https:\/\/www.strongd.net\/?p=1183\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">php 5.3.3 \u4e2d\u7684php-fpm\u914d\u7f6e<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[192],"class_list":["post-1183","post","type-post","status-publish","format-standard","hentry","category-20","tag-php-fpm"],"_links":{"self":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/1183","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1183"}],"version-history":[{"count":1,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/1183\/revisions"}],"predecessor-version":[{"id":1184,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/1183\/revisions\/1184"}],"wp:attachment":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1183"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}