1.lnmp安装redis拓展php
wget http://download.redis.io/releases/redis-4.0.9.tar.gz git
chmod 755 redis-4.0.9.tar.gzgithub
tar -zxvf redis-4.0.9.tar.gzredis
cd redis-4.0.9swoole
make async
cd srcserver
./redis-server #开启redis服务blog
2.安装hiredis库ip
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
便可