首頁 > 後端開發 > php教程 > mac下swoole安裝步驟

mac下swoole安裝步驟

WBOY
發布: 2016-07-29 09:06:56
原創
1142 人瀏覽過
<ol>
<li>
<code><span>1</span><span>、下载</span><span>swoole</span><span>源码(一般下载稳定版)</span></code></li>
<li><code></code></li>
<li><code><span>下载地址:</span><span>https</span><span>://</span><span>github</span><span>.</span><span>com</span><span>/</span><span>swoole</span><span>/</span><span>swoole</span><span>-</span><span>src</span><span>/</span><span>releases</span></code></li>
<li><code></code></li>
<li><code><span>2</span><span>、</span><span>cd swoole</span><span>-</span><span>src</span><span>-</span><span>swoole</span><span>-</span><span>1.7</span><span>.</span><span>22</span><span>-</span><span>stable</span><span>(进入解压后的目录)</span></code></li>
<li><code><span>3</span><span>、</span><span>phpize </span><span>(生成config脚本工具,如果报错./</span><span>configure</span><span>:</span><span>No</span><span> such file or directory</span><span>,用</span><span>sudo brew install autoconf</span><span>)</span></code></li>
<li><code><span>4</span><span>、./</span><span>configure </span></code></li>
<li><code><span>5</span><span>、</span><span>make</span></code></li>
<li><code><span>6</span><span>、</span><span>sudo make install</span></code></li>
<li><code></code></li>
<li><code><span>7</span><span>、</span><span>ls modules</span><span>/</span><span>   </span><span>(在</span><span>modules</span><span>目录查看是否有</span><span>swoole</span><span>.</span><span>so</span><span>扩展,如果说明成功)</span></code></li>
<li><code></code></li>
<li><code></code></li>
<li><code><span>8</span><span>、</span><span>php </span><span>-</span><span>i</span><span>|</span><span>grep php</span><span>.</span><span>ini   </span><span>(查找</span><span>php</span><span>.</span><span>ini</span><span>配置路径)</span></code></li>
<li><code></code></li>
<li><code></code></li>
<li><code><span>9</span><span>、</span><span>sudo vi </span><span>/</span><span>usr</span><span>/</span><span>local</span><span>/</span><span>etc</span><span>/</span><span>php</span><span>/</span><span>5.4</span><span>/</span><span>php</span><span>.</span><span>ini </span></code></li>
<li><code></code></li>
<li><code><span>(在文件最后加上</span><span>extension</span><span>=</span><span>swoole</span><span>.</span><span>so</span><span>)</span></code></li>
<li><code></code></li>
<li><code></code></li>
<li><code><span>10</span><span>、</span><span>php </span><span>-</span><span>m </span><span>(即可看到扩展模块</span><span>swoole</span><span>)</span></code></li>
<li><code></code></li>
<li>
<p><code><span>11</span><span>、cd examples/  (进入范例目录测试)
</span></code></p>
<p><code><span>    php server.php </span></code></p>
</li>
</ol>
登入後複製

以上就介紹了mac下swoole安裝步驟,包括了方面的內容,希望對PHP教程有興趣的朋友有所幫助。

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板