环境依赖

  • hiredis(redis异步库)
  • redis
  • mysql
  • php >5.6 或者 php > 7.0
  • swoole >=1.9.17(建议升级到最新版本) (在编译swoole时加入—enable-async-redis,开启异步redis客户端, —enable-openssl开启openssl支持,—with-openssl-dir指定你的openssl目录)

注:openssl是用于http异步客户端抓取https网址时依赖的模块,可以选择性开启

hiredis安装命令

  1. wget https://github.com/redis/hiredis/archive/v0.13.3.zip
  2. unzip v0.13.3.zip
  3. cd hiredis-0.13.3
  4. sudo make && sudo make install
  5. sudo ldconfig

swoole安装

  1. wget https://github.com/swoole/swoole-src/archive/v1.9.22.zip
  2. unzip v1.9.22.zip
  3. cd swoole-src-1.9.22
  4. phpize
  5. ./configure --enable-async-redis
  6. sudo make
  7. sudo make install