swoole使用异步redis
1.lnmp安装redis拓展
wget http://download.redis.io/releases/redis-4.0.9.tar.gz
chmod 755 redis-4.0.9.tar.gz
tar -zxvf redis-4.0.9.tar.gz
cd redis-4.0.9
make
cd src
./redis-server #开启redis服务
2.安装hiredis库
wget https://github.com/redis/hiredis/archive/v0.13.3.zip
unzip v0.13.3.zip
cd hiredis-0.13.3
make -j
sudo make install
sudo ldconfig
3.重新编译swoole
./configure --with-php-config=/usr/local/php/bin/php-config --enable-async-redis (--disable-fileinfo 内存太低可加入该命令)
make clean
make -j
sudo make install
php -m (查看是否有 swoole拓展)
php --ri swoole
即可