微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Swoole 安装

1、Swoole依赖安装

hiredis

sudo wget https://github.com/redis/hiredis/archive/v0.14.0.tar.gz

sudo tar xf v0.14.0.tar.gz
cd hiredis-0.14.0/
sudo make
sudo make install
sudo ldconfig
需要在编译时增加--enable-async-redis来开启此功能

nghttp2

sudo wget https://github.com/nghttp2/nghttp2/releases/download/v1.37.0/nghttp2-1.37.0.tar.gz

sudo tar xf nghttp2-1.37.0.tar.gz
cd nghttp2-1.37.0/
sudo ./configure
sudo make
sudo make install

2、Swoole安装


sudo wget https://github.com/swoole/swoole-src/archive/v4.2.12.tar.gz
sudo tar xf v4.2.12.tar.gz
cd swoole-src-4.2.12/

sudo PHPize

sudo ./configure \
--with-PHP-config=/usr/local/PHP/bin/PHP-config \
--enable-coroutine \
--enable-openssl  \
--with-openssl-dir \
--enable-http2  \
--enable-async-redis \
--enable-sockets \
--enable-MysqLnd 

sudo make clean  
sudo make && sudo make install

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐