1. 下载swoole 源码

https://gitee.com/swoole/swoole.git

2. 解压 unzip swoole-swoole-v2.2.0.zip 

3. cd   swoole   发现没有 ./configure(用来编译安装配置软件的),可以用phpize 生成

4. 在swool目录下 直接使用phpize就可以生产

(这里有一个坑, 必须要首先安装 agt-get  install autoconf    这个命令, 不然configure不会安装上  

Ubuntu 源码安装swoole


5. autoconf安转好 在使用phpize 生成 如下

Ubuntu 源码安装swoole


6. 将swoole加入到php的扩展中,正确找到自己的php-config(会存在多版本php状况)

        ./configure --with-php-config=/usr/local/php/bin/php-config

7. make && make install

安装好了

Ubuntu 源码安装swoole

Ubuntu 源码安装swoole


8. 配置php.ini 

extension=swoole


9. php -m 

查看有没有这个模块


相关文章: