{"id":756,"date":"2016-05-23T15:17:56","date_gmt":"2016-05-23T07:17:56","guid":{"rendered":"http:\/\/www.luwl.net\/?p=756"},"modified":"2017-11-10T21:12:41","modified_gmt":"2017-11-10T13:12:41","slug":"swoole%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"http:\/\/www.luwl.net\/?p=756","title":{"rendered":"swoole\u5b89\u88c5"},"content":{"rendered":"<p>\u5b89\u88c5wdcp3.0\u53ef\u4ee5\u4f7f\u7528centos6.5\uff0c\u57287\u7248\u672c\u7684\u7cfb\u7edf\u4e0a\u4f1a\u51fa\u73b0\u95ee\u9898\u3002<\/p>\n<p>\u5b89\u88c5\u5b8c\u6bd5\u540e\u9700\u8981\u8bbe\u7f6ephp\u5230\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/p>\n<p>\u4fee\u6539 ect\/profile<\/p>\n<p>\u52a0\u5165\uff1a<\/p>\n<p>export PATH=&#8221;$PATH:\/www\/wdlinux\/php\/bin:\/www\/wdlinux\/mysql\/bin&#8221;<\/p>\n<p>\u7136\u540e\u91cd\u542f\u3002<\/p>\n<p>\u91cd\u542f\u540e\u53ef\u4ee5\u7528php &#8211;version\u547d\u4ee4\u4e86\u5c31\u662f\u8bbe\u7f6e\u6b63\u786e<\/p>\n<p>\u5b89\u88c5\u5b8cPHP\u540e\uff0c\u5373\u53ef\u5b89\u88c5swoole\u6269\u5c55\u3002 swoole\u6269\u5c55\u4e0b\u8f7d\u5730\u5740\uff1a<a href=\"https:\/\/github.com\/swoole\/swoole-src\/releases\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/swoole\/swoole-src\/releases<\/a>?\u5c3d\u91cf\u9009\u62e9stable\u7248\u672c\uff0calpha\u7248\u672c\u6700\u597d\u4ec5\u7528\u4e8e\u5b9e\u9a8c\u65b0\u7279\u6027\u3002 \u89e3\u538b\u6e90\u7801\u81f3\u4efb\u610f\u76ee\u5f55\uff0c\u6267\u884c\u5982\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>cd swoole-src-swoole-1.7.6-stable\/<br \/>\nphpize<br \/>\n.\/configure &#8211;enable-async-mysql<br \/>\nsudo make<br \/>\nsudo make install<\/p>\n<p>(\u6ce8\uff1aswoole\u7684.\/configure\u6709\u5f88\u591a\u989d\u5916\u53c2\u6570\uff0c\u53ef\u4ee5\u901a\u8fc7.\/configure &#8211;help\u547d\u4ee4\u67e5\u770b\uff0c\u8fd9\u91cc\u4ec5\u5f00\u542f\u5176\u4e2dasync-mysql\u9879\uff0c\u5176\u4ed6\u5747\u9009\u62e9\u9ed8\u8ba4\u9879) \u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u8fdb\u5165\/etc\/php\u76ee\u5f55\u4e0b\uff0c\u6253\u5f00php.ini\u6587\u4ef6\uff0c\u5728\u5176\u4e2d\u52a0\u4e0a\u5982\u4e0b\u4e00\u53e5\uff1a<br \/>\nextension=swoole.so<\/p>\n<p>\u91cd\u542fweb\u670d\u52a1\u540e\uff0c\u5373\u53ef\u68c0\u67e5swoole\u662f\u5426\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u547d\u4ee4\u884c\u4e0b\uff0c\u4f7f\u7528\u5230\u7684\u547d\u4ee4\uff1a<\/p>\n<p>ls\u5217\u51fa\u6587\u4ef6\u5939\u76ee\u5f55<br \/>\ncd ..\/ \u8fd4\u56de\u4e0a\u7ea7\u76ee\u5f55<br \/>\nvi \u7f16\u8f91\u6587\u4ef6<br \/>\nVI\u91cci\u5c31\u53ef\u4ee5\u7f16\u8f91\uff0c\u7f16\u8f91\u597d\u540eESC\uff0c\u518d&#8221;:wq&#8221;\u4fdd\u5b58\u9000\u51fa\u3002<\/p>\n<p>tar? -zxvf \u89e3\u538btar.gz\u683c\u5f0f\u6587\u4ef6<\/p>\n<p>&nbsp;<\/p>\n<p>centos7\u4e0b\uff0c\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u540e\u6267\u884c<\/p>\n<p>source \/etc\/profile<\/p>\n<p>\u4e0d\u62a5\u9519\u5c31\u53ef\u4ee5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5wdcp3.0\u53ef\u4ee5\u4f7f\u7528centos6.5\uff0c\u57287\u7248\u672c\u7684\u7cfb\u7edf\u4e0a\u4f1a\u51fa\u73b0\u95ee\u9898\u3002 \u5b89\u88c5 &hellip; <a href=\"http:\/\/www.luwl.net\/?p=756\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-756","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.luwl.net\/index.php?rest_route=\/wp\/v2\/posts\/756","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.luwl.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.luwl.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.luwl.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.luwl.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=756"}],"version-history":[{"count":6,"href":"http:\/\/www.luwl.net\/index.php?rest_route=\/wp\/v2\/posts\/756\/revisions"}],"predecessor-version":[{"id":1041,"href":"http:\/\/www.luwl.net\/index.php?rest_route=\/wp\/v2\/posts\/756\/revisions\/1041"}],"wp:attachment":[{"href":"http:\/\/www.luwl.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=756"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.luwl.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=756"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.luwl.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}