<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>swoole &#8211; 記下來</title>
	<atom:link href="https://noter.tw/tag/swoole/feed/" rel="self" type="application/rss+xml" />
	<link>https://noter.tw</link>
	<description>一路上踩到的坑、遇到的問題，一點一滴記下來，希望能幫助到需要的人~</description>
	<lastBuildDate>Tue, 03 Dec 2019 16:23:53 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.3</generator>

<image>
	<url>https://noter.tw/wp-content/uploads/cropped-old-1130742_1920-1-32x32.jpg</url>
	<title>swoole &#8211; 記下來</title>
	<link>https://noter.tw</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Ubuntu 16.04 編譯並安裝 Swoole</title>
		<link>https://noter.tw/3963/ubuntu-16-04-%e7%b7%a8%e8%ad%af%e4%b8%a6%e5%ae%89%e8%a3%9d-swoole/</link>
					<comments>https://noter.tw/3963/ubuntu-16-04-%e7%b7%a8%e8%ad%af%e4%b8%a6%e5%ae%89%e8%a3%9d-swoole/#respond</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Thu, 14 Jun 2018 14:59:16 +0000</pubDate>
				<category><![CDATA[Web Server]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpize]]></category>
		<category><![CDATA[swoole]]></category>
		<guid isPermaLink="false">https://wazai.net/?p=3963</guid>

					<description><![CDATA[<p>接到一個好朋友的求救，需要在 Ubuntu 16.04 下安裝 Swoole 模組，讓 apache 更虎虎生風！第一次做這件事，記錄留個底，也許能幫到需要的人。 介紹這有什麼功能以及強項一向不是小蛙&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/3963/ubuntu-16-04-%e7%b7%a8%e8%ad%af%e4%b8%a6%e5%ae%89%e8%a3%9d-swoole/" data-wpel-link="internal">Ubuntu 16.04 編譯並安裝 Swoole</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>接到一個好朋友的求救，需要在 Ubuntu 16.04 下安裝 Swoole 模組，讓 apache 更虎虎生風！第一次做這件事，記錄留個底，也許能幫到需要的人。</p>



<span id="more-3963"></span>



<p>介紹這有什麼功能以及強項一向不是小蛙的 style，這邊就是記錄怎麼把這東西安裝起來比較重要，介紹性的文章就找一些專業的介紹文來看吧！總之會來到這邊的人應該是想知道怎麼把這東西裝起來的吧！(應該吧！哈哈)</p>



<p>這個編譯過程比想像中的還要容易一些，期間沒有遇到什麼詭異的大問題，直接進入步驟吧！</p>



<h2 class="para wp-block-heading">步驟</h2>



<p>先到 <a rel="noreferrer noopener nofollow external" href="https://github.com/swoole/swoole-src/releases/tag/v2.0.10-stable" target="_blank" data-wpel-link="external" class="wpel-icon-right">參考資料1<span class="wpel-icon wpel-image wpel-icon-6"></span></a> 下載 Source Code，小蛙下載的時候已經有 v4.0.0，但總覺得怪怪的，因此還是找了 <a rel="noreferrer noopener nofollow external" href="https://github.com/swoole/swoole-src/releases/tag/v2.0.10-stable" target="_blank" data-wpel-link="external" class="wpel-icon-right">v2.0.10-stable<span class="wpel-icon wpel-image wpel-icon-6"></span></a> 來做比較保險，至少名稱上有個 stable，下載完後解壓縮，並進入該資料夾。</p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">wget https://github.com/swoole/swoole-src/archive/v2.0.10-stable.zip
unzip v2.0.10-stable.zip
cd swoole-src-2.0.10-stable/</pre>



<p>安裝 php-dev</p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">apt-get install php-dev</pre>



<p>執行編譯，這邊小蛙的主機上竟然沒有 make，必須要先 <code>apt-get install make</code> 來安裝 make 工具。</p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">phpize
./configure
make</pre>



<p>完成囉！</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" src="https://noter.tw/wp-content/uploads/2018/06/swoole_make_install.png" alt="swoole make install Ubuntu 16.04 編譯並安裝 Swoole" title="Ubuntu 16.04 編譯並安裝 Swoole"></figure></div>



<p>修改 php.ini 導入模組，小蛙使用的這版 php 跟以前那種直接去 php.ini 新增 extension=swoole.so 不太一樣，而是在安裝目錄下載入 module。</p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">cd /etc/php/7.2/mods-available/
隨便複製一個 ini
cp mysqli.ini swoole.ini
vim swoole.ini
把 extension=mysqli.so 改成 extension=swoole.so
cd /etc/php/7.2/cli/conf.d/
ln -s /etc/php/7.2/mods-available/swoole.ini 20-swoole.ini
service apache2 restart
檢查是否正確安裝
php -m | grep 'swoole'</pre>



<p>目前小蛙也還在看看 swoole 能做到哪些酷炫的事情，看看是否自己的主機也要裝這個模組！</p>



<h2 class="para wp-block-heading">參考資料</h2>



<ul class="my-li bg-darkblue wp-block-list"><li><a rel="noreferrer noopener nofollow external" href="https://github.com/swoole/swoole-src/releases/tag/v2.0.10-stable" target="_blank" data-wpel-link="external" class="wpel-icon-right">Swoole @ GitHub<span class="wpel-icon wpel-image wpel-icon-6"></span></a></li></ul>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/3963/ubuntu-16-04-%e7%b7%a8%e8%ad%af%e4%b8%a6%e5%ae%89%e8%a3%9d-swoole/" data-wpel-link="internal">Ubuntu 16.04 編譯並安裝 Swoole</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/3963/ubuntu-16-04-%e7%b7%a8%e8%ad%af%e4%b8%a6%e5%ae%89%e8%a3%9d-swoole/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
