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

相关文章

1.SW的HttpServerHttpServer的本质仍然是swoole_server,其协...
1、Swoole依赖安装hiredissudowgethttps://github.comedis/h...
直接安装会提示找不到openssl/ssl.h文件即便通过Brew安装了O...
1.安装依赖yum install -y php php-pear php-devel ht...
php
下载swoole地址:https://pan.baidu.com/s/1_N3RiFtT3iHLA5x...
昨晚我躺在床上,百无聊赖地翻阅 阿兰·德波顿《身份的焦虑...