
{"id":2843,"date":"2019-01-09T14:16:50","date_gmt":"2019-01-09T06:16:50","guid":{"rendered":"https:\/\/www.webteach.tw\/?p=2843"},"modified":"2019-01-09T14:16:50","modified_gmt":"2019-01-09T06:16:50","slug":"linux-install-swoole-on-ubuntu-18-04-lts","status":"publish","type":"post","link":"https:\/\/www.webteach.tw\/?p=2843","title":{"rendered":"[ Linux ] &#8211; Install Swoole on Ubuntu 18.04 lts"},"content":{"rendered":"<div style='text-align:center' class='yasr-auto-insert-overall'><\/div><div style='text-align:center' class='yasr-auto-insert-visitor'><\/div><div style=\"margin-top: 0px; margin-bottom: 0px;\" class=\"sharethis-inline-share-buttons\" ><\/div>\n\t\t\t\t\n<p>\u6700\u8fd1\u5728\u7814\u7a76socket \u7121\u610f\u9593\u67e5\u5230 Swoole \u9019\u6771\u6771\uff0c\u807d\u8aaa\u662f\u500b\u597d\u7269\u53ef\u589e\u52a0php\u6548\u80fd\uff0c\u63d0\u4f9b\u9ad8\u4f75\u767c\u7684\u57f7\u884c\uff0c\u6548\u80fd\u6bd4node.js\u9ad8\u5341\u500d\u3002\u53c8\u627e\u5230\u4e00\u500b\u7c21\u6613\u7684\u7dda\u4e0a\u804a\u5929\u5ba4\u7684\u7bc4\u4f8b\u60f3\u4f86\u73a9\u770b\u770b\uff0c\u7576\u7136\u524d\u63d0\u7684\u74b0\u5883\u8981\u67b6\u8a2d\u597d\u3002<\/p>\n\n\n<p><strong>\u5b89\u88dd<\/strong><br \/>\u6307\u4ee4\uff1aapt install php-pear<br \/>\u6307\u4ee4\uff1aapt install php7.2-dev <br \/>\u6307\u4ee4\uff1apecl install swoole <br \/>\u88dd\u5b8c\u5f8c\u52d5\u4f5c<br \/><strong>\u8a2d\u5b9aphp extension<\/strong><br \/>\u6307\u4ee4\uff1anano \/etc\/php\/7.2\/cli\/php.ini<br \/>\u5728\u8a2d\u5b9a\u6a94\u6700\u4e0b\u65b9\u589e\u52a0\u64f4\u5c55<br \/>extension=swoole.so<br \/>\u5b58\u6a94\u5f8c\u91cd\u65b0\u555f\u52d5apache2<br \/>\u6307\u4ee4\uff1aservice apache2 restart<\/p>\n\n\n<p><strong>\u76f8\u95dc\u9023\u7d50<\/strong><br \/>Swoole\u5b98\u7db2\uff1a<a rel=\"noreferrer noopener\" aria-label=\" (\u5728\u65b0\u5206\u9801\u4e2d\u958b\u555f)\" href=\"https:\/\/wiki.swoole.com\/wiki\/index\/prid-1\" target=\"_blank\">https:\/\/wiki.swoole.com\/wiki\/index\/prid-1<\/a><br \/>\u804a\u5929\u5ba4\u6e90\u78bc\uff1a<a href=\"https:\/\/github.com\/onebig32\/swoole\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (\u5728\u65b0\u5206\u9801\u4e2d\u958b\u555f)\">https:\/\/github.com\/onebig32\/swoole<\/a><\/p>\n\n\n<p><strong>\u5099\u8a3b<\/strong><br \/>swoole \u9700\u8981\u5728php7\u542b\u4ee5\u4e0a\u7248\u672c\u624d\u80fd\u5b89\u88dd<\/p>\n\n\n<p><\/p>\n\t\t<div style='text-align:center' class='yasr-auto-insert-overall'><\/div><div style='text-align:center' class='yasr-auto-insert-visitor'><\/div>","protected":false},"excerpt":{"rendered":"<p>\t\t\t\t\u6700\u8fd1\u5728\u7814\u7a76socket \u7121\u610f\u9593\u67e5\u5230 Swoole \u9019\u6771\u6771\uff0c\u807d\u8aaa\u662f\u500b\u597d\u7269\u53ef\u589e\u52a0php\u6548\u80fd\uff0c\u63d0\u4f9b\u9ad8\u4f75\u767c\u7684\u57f7\u884c\uff0c\u6548\u80fd\u6bd4node.js\u9ad8\u5341\u500d\u3002\u53c8\u627e\u5230\u4e00\u500b\u7c21\u6613\u7684\u7dda\u4e0a\u804a\u5929\u5ba4\u7684\u7bc4\u4f8b\u60f3\u4f86\u73a9\u770b\u770b\uff0c\u7576\u7136\u524d\u63d0\u7684\u74b0\u5883\u8981\u67b6\u8a2d\u597d\u3002\t\t<\/p>\n","protected":false},"author":1,"featured_media":2845,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"yasr_overall_rating":0,"yasr_post_is_review":"","yasr_auto_insert_disabled":"","yasr_review_type":"","footnotes":""},"categories":[32,41],"tags":[370,551,577],"class_list":["post-2843","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-ubuntu","tag-linux","tag-swoole","tag-ubuntu-18-04"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>[ Linux ] - Install Swoole on Ubuntu 18.04 lts - \u6df7\u6c34\u6478\u9b5a<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webteach.tw\/?p=2843\" \/>\n<meta property=\"og:locale\" content=\"zh_TW\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[ Linux ] - Install Swoole on Ubuntu 18.04 lts - \u6df7\u6c34\u6478\u9b5a\" \/>\n<meta property=\"og:description\" content=\"\u6700\u8fd1\u5728\u7814\u7a76socket \u7121\u610f\u9593\u67e5\u5230 Swoole \u9019\u6771\u6771\uff0c\u807d\u8aaa\u662f\u500b\u597d\u7269\u53ef\u589e\u52a0php\u6548\u80fd\uff0c\u63d0\u4f9b\u9ad8\u4f75\u767c\u7684\u57f7\u884c\uff0c\u6548\u80fd\u6bd4node.js\u9ad8\u5341\u500d\u3002\u53c8\u627e\u5230\u4e00\u500b\u7c21\u6613\u7684\u7dda\u4e0a\u804a\u5929\u5ba4\u7684\u7bc4\u4f8b\u60f3\u4f86\u73a9\u770b\u770b\uff0c\u7576\u7136\u524d\u63d0\u7684\u74b0\u5883\u8981\u67b6\u8a2d\u597d\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webteach.tw\/?p=2843\" \/>\n<meta property=\"og:site_name\" content=\"\u6df7\u6c34\u6478\u9b5a\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-09T06:16:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webteach.tw\/wp-content\/uploads\/2019\/01\/FireShot-Capture-1-\u53ef\u53ef\u5154\u804a\u5929\u5ba4-http___127.0.0.1_swoole_html_.png\" \/>\n\t<meta property=\"og:image:width\" content=\"860\" \/>\n\t<meta property=\"og:image:height\" content=\"626\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"jeff\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005:\" \/>\n\t<meta name=\"twitter:data1\" content=\"jeff\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=2843#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=2843\"},\"author\":{\"name\":\"jeff\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#\\\/schema\\\/person\\\/d434d754fd581338113eecfa923d7520\"},\"headline\":\"[ Linux ] &#8211; Install Swoole on Ubuntu 18.04 lts\",\"datePublished\":\"2019-01-09T06:16:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=2843\"},\"wordCount\":52,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=2843#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.webteach.tw\\\/wp-content\\\/uploads\\\/2019\\\/01\\\/FireShot-Capture-1-\u53ef\u53ef\u5154\u804a\u5929\u5ba4-http___127.0.0.1_swoole_html_.png\",\"keywords\":[\"linux\",\"Swoole\",\"Ubuntu 18.04\"],\"articleSection\":[\"Linux\",\"Ubuntu\"],\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.webteach.tw\\\/?p=2843#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=2843\",\"url\":\"https:\\\/\\\/www.webteach.tw\\\/?p=2843\",\"name\":\"[ Linux ] - Install Swoole on Ubuntu 18.04 lts - \u6df7\u6c34\u6478\u9b5a\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=2843#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=2843#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.webteach.tw\\\/wp-content\\\/uploads\\\/2019\\\/01\\\/FireShot-Capture-1-\u53ef\u53ef\u5154\u804a\u5929\u5ba4-http___127.0.0.1_swoole_html_.png\",\"datePublished\":\"2019-01-09T06:16:50+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#\\\/schema\\\/person\\\/d434d754fd581338113eecfa923d7520\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=2843#breadcrumb\"},\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.webteach.tw\\\/?p=2843\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=2843#primaryimage\",\"url\":\"https:\\\/\\\/www.webteach.tw\\\/wp-content\\\/uploads\\\/2019\\\/01\\\/FireShot-Capture-1-\u53ef\u53ef\u5154\u804a\u5929\u5ba4-http___127.0.0.1_swoole_html_.png\",\"contentUrl\":\"https:\\\/\\\/www.webteach.tw\\\/wp-content\\\/uploads\\\/2019\\\/01\\\/FireShot-Capture-1-\u53ef\u53ef\u5154\u804a\u5929\u5ba4-http___127.0.0.1_swoole_html_.png\",\"width\":860,\"height\":626,\"caption\":\"\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=2843#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9801\",\"item\":\"https:\\\/\\\/www.webteach.tw\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[ Linux ] &#8211; Install Swoole on Ubuntu 18.04 lts\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#website\",\"url\":\"https:\\\/\\\/www.webteach.tw\\\/\",\"name\":\"\u6df7\u6c34\u6478\u9b5a\",\"description\":\"\u5b78\u7121\u6b62\u5883,\u6559\u5b78\u76f8\u9577\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.webteach.tw\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-TW\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#\\\/schema\\\/person\\\/d434d754fd581338113eecfa923d7520\",\"name\":\"jeff\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g\",\"caption\":\"jeff\"},\"sameAs\":[\"http:\\\/\\\/35.72.55.111\"],\"url\":\"https:\\\/\\\/www.webteach.tw\\\/?author=1\"},false]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[ Linux ] - Install Swoole on Ubuntu 18.04 lts - \u6df7\u6c34\u6478\u9b5a","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webteach.tw\/?p=2843","og_locale":"zh_TW","og_type":"article","og_title":"[ Linux ] - Install Swoole on Ubuntu 18.04 lts - \u6df7\u6c34\u6478\u9b5a","og_description":"\u6700\u8fd1\u5728\u7814\u7a76socket \u7121\u610f\u9593\u67e5\u5230 Swoole \u9019\u6771\u6771\uff0c\u807d\u8aaa\u662f\u500b\u597d\u7269\u53ef\u589e\u52a0php\u6548\u80fd\uff0c\u63d0\u4f9b\u9ad8\u4f75\u767c\u7684\u57f7\u884c\uff0c\u6548\u80fd\u6bd4node.js\u9ad8\u5341\u500d\u3002\u53c8\u627e\u5230\u4e00\u500b\u7c21\u6613\u7684\u7dda\u4e0a\u804a\u5929\u5ba4\u7684\u7bc4\u4f8b\u60f3\u4f86\u73a9\u770b\u770b\uff0c\u7576\u7136\u524d\u63d0\u7684\u74b0\u5883\u8981\u67b6\u8a2d\u597d\u3002","og_url":"https:\/\/www.webteach.tw\/?p=2843","og_site_name":"\u6df7\u6c34\u6478\u9b5a","article_published_time":"2019-01-09T06:16:50+00:00","og_image":[{"width":860,"height":626,"url":"https:\/\/www.webteach.tw\/wp-content\/uploads\/2019\/01\/FireShot-Capture-1-\u53ef\u53ef\u5154\u804a\u5929\u5ba4-http___127.0.0.1_swoole_html_.png","type":"image\/png"}],"author":"jeff","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005:":"jeff"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webteach.tw\/?p=2843#article","isPartOf":{"@id":"https:\/\/www.webteach.tw\/?p=2843"},"author":{"name":"jeff","@id":"https:\/\/www.webteach.tw\/#\/schema\/person\/d434d754fd581338113eecfa923d7520"},"headline":"[ Linux ] &#8211; Install Swoole on Ubuntu 18.04 lts","datePublished":"2019-01-09T06:16:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webteach.tw\/?p=2843"},"wordCount":52,"commentCount":0,"image":{"@id":"https:\/\/www.webteach.tw\/?p=2843#primaryimage"},"thumbnailUrl":"https:\/\/www.webteach.tw\/wp-content\/uploads\/2019\/01\/FireShot-Capture-1-\u53ef\u53ef\u5154\u804a\u5929\u5ba4-http___127.0.0.1_swoole_html_.png","keywords":["linux","Swoole","Ubuntu 18.04"],"articleSection":["Linux","Ubuntu"],"inLanguage":"zh-TW","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webteach.tw\/?p=2843#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webteach.tw\/?p=2843","url":"https:\/\/www.webteach.tw\/?p=2843","name":"[ Linux ] - Install Swoole on Ubuntu 18.04 lts - \u6df7\u6c34\u6478\u9b5a","isPartOf":{"@id":"https:\/\/www.webteach.tw\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webteach.tw\/?p=2843#primaryimage"},"image":{"@id":"https:\/\/www.webteach.tw\/?p=2843#primaryimage"},"thumbnailUrl":"https:\/\/www.webteach.tw\/wp-content\/uploads\/2019\/01\/FireShot-Capture-1-\u53ef\u53ef\u5154\u804a\u5929\u5ba4-http___127.0.0.1_swoole_html_.png","datePublished":"2019-01-09T06:16:50+00:00","author":{"@id":"https:\/\/www.webteach.tw\/#\/schema\/person\/d434d754fd581338113eecfa923d7520"},"breadcrumb":{"@id":"https:\/\/www.webteach.tw\/?p=2843#breadcrumb"},"inLanguage":"zh-TW","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webteach.tw\/?p=2843"]}]},{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/www.webteach.tw\/?p=2843#primaryimage","url":"https:\/\/www.webteach.tw\/wp-content\/uploads\/2019\/01\/FireShot-Capture-1-\u53ef\u53ef\u5154\u804a\u5929\u5ba4-http___127.0.0.1_swoole_html_.png","contentUrl":"https:\/\/www.webteach.tw\/wp-content\/uploads\/2019\/01\/FireShot-Capture-1-\u53ef\u53ef\u5154\u804a\u5929\u5ba4-http___127.0.0.1_swoole_html_.png","width":860,"height":626,"caption":""},{"@type":"BreadcrumbList","@id":"https:\/\/www.webteach.tw\/?p=2843#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9801","item":"https:\/\/www.webteach.tw\/"},{"@type":"ListItem","position":2,"name":"[ Linux ] &#8211; Install Swoole on Ubuntu 18.04 lts"}]},{"@type":"WebSite","@id":"https:\/\/www.webteach.tw\/#website","url":"https:\/\/www.webteach.tw\/","name":"\u6df7\u6c34\u6478\u9b5a","description":"\u5b78\u7121\u6b62\u5883,\u6559\u5b78\u76f8\u9577","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webteach.tw\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-TW"},{"@type":"Person","@id":"https:\/\/www.webteach.tw\/#\/schema\/person\/d434d754fd581338113eecfa923d7520","name":"jeff","image":{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/secure.gravatar.com\/avatar\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g","caption":"jeff"},"sameAs":["http:\/\/35.72.55.111"],"url":"https:\/\/www.webteach.tw\/?author=1"},false]}},"views":1843,"yasr_visitor_votes":{"stars_attributes":{"read_only":false,"span_bottom":false},"number_of_votes":0,"sum_votes":0},"_links":{"self":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/2843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2843"}],"version-history":[{"count":0,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/2843\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/media\/2845"}],"wp:attachment":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}