swoole 编译安装

https://my.oschina.net/u/3529405/blog/1649381               php 安装

下载swoole 源码

进入源码目录

输入

phpize  

可能会报错

Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

出现错误

安装两个依赖  sudo apt-get install m4    和 sudo apt-get install autoconf

安装后再次phpize 

./configure

依赖检查,如果报错..百度一下。基本安装正常都不会出现错误

sudo make
sudo make install

输出

Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20160303/
Installing header files:          /usr/local/php/include/php/

找到你的php.ini 文件添加模块

extension=swoole.so

猜你喜欢

转载自my.oschina.net/u/3529405/blog/1649416