安装hiredis
- hiredis下载地址:https://github.com/redis/hiredis/releases
编译安装
? ~ unzip hiredis-0.13.3
? ~ cd hiredis-0.13.3
? hiredis-0.13.3 make -j
? hiredis-0.13.3 sudo make install
重新编译swoole
,加入--enable-async-redis
? ~ cd /Applications/MAMP/bin/php/php7.0.27/include/php/swoole-src/
? swoole-src ./configure --with-php-config=/Applications/MAMP/bin/php/php7.0.27/bin/php-config --enable-async-redis
? swoole-src make clean
? swoole-src make -j
? swoole-src sudo make install
查看是否编译成功
? ~ php --ri swoole
//出现此条表示编译正确
async redis client => enabled