首页 > 后端开发 > php教程 > mac下swoole安装步骤

mac下swoole安装步骤

WBOY
发布: 2016-07-29 09:06:56
原创
1143 人浏览过
<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
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板