php swoole 配置

  1.  克隆最新的 swoole 源代码 

[root@localhost swoole]# git clone https://gitee.com/swoole/swoole.git

    2. 生成configure 文件 

[root@localhost swoole]# /home/work/study/soft/php/bin/phpize



3.指定PHP配置文件路径

 [root@localhost swoole]# ./configure --with-php-config=/home/work/study/soft/php/bin/php-config

4. 编译和安装

 [root@localhost swoole]# make  && make install

Build complete.

Don't forget to run 'make test'.

Installing shared extensions:    /home/work/study/soft/php/lib/php/extensions/no-debug-non-zts-20170718/

Installing header files:          /home/work/study/soft/php/include/php/



5. 配置php.ini ,加入扩展


[root@localhost lib]# pwd

/home/work/study/soft/php/lib



[root@localhost lib]# vim php.ini



;extension=pdo_sqlite 

;extension=pgsql 

;extension=shmop

extension=swoole  // 添加swoole 扩展

;he MIBS data available in the PHP distribution must be installed.

; See http://www.php.net/manual/en/snmp.installation.php;extension=snmp



6. 查看php 已经安装的扩展

[root@localhost lib]# PHP-m


php swoole 配置_第1张图片

ok 可以愉快的玩耍了。

你可能感兴趣的:(php swoole 配置)