通知短信+运营短信,5秒速达,支持群发助手一键发送🚀高效触达和通知客户 广告
# 异步Redis客户端 [TOC] `Swoole-1.8.0`版本增加了对异步Redis客户端的支持,基于redis官方提供的[hiredis](https://github.com/redis/hiredis)库实现。Swoole提供了`__call`魔术方法,来映射绝大部分Redis指令。 ## 编译安装hiredis 使用Redis客户端,需要安装hiredis库。下载`hiredis`源码后,执行 ~~~ make -j sudo make install sudo ldconfig ~~~ * `hiredis`下载地址:[https://github.com/redis/hiredis/releases](https://github.com/redis/hiredis/releases) 也可以使用`apt`或`yum`安装`hiredis`,请务必安装`dev`包 * Ubuntu:`apt install libhiredis-dev` * CentOS:`yum install libhiredis-devel` ## 启用异步Redis客户端 > 4.2.x 中`redis-client`即是 异步redis客户端开启, 并非无法开启, 以实际使用为准 编译swoole时,在`configure`指令中加入`--enable-async-redis` ~~~ ./configure --enable-async-redis make clean make -j sudo make install ~~~ ## 可能遇到的问题 `php-m`发现swoole消失或者是通过`php --ri swoole`没有显示`async redis client`或`redis client` ~~~ vi ~/.bash_profile 在最后一行添加 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib source ~/.bash_profile ~~~ 重新编译安装swoole即可