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

swoole使用异步redis

即可

相关文章:

  • 2021-05-19
  • 2021-06-14
  • 2021-06-08
  • 2021-09-11
  • 2021-06-25
  • 2021-11-23
  • 2021-09-18
  • 2021-11-10
猜你喜欢
  • 2021-11-20
  • 2021-08-15
  • 2022-01-11
  • 2021-06-07
  • 2021-06-24
  • 2019-01-25
  • 2021-04-26
  • 2021-07-15
相关资源
相似解决方案