centos在php7.4版本安装redis扩展

发布时间:2020/04/26 作者:天马行空 阅读(2884)

1、官网下载扩展:http://pecl.php.net/package/redis

wget http://pecl.php.net/get/redis-5.2.1.tgz


2、安装

ar -zvxf redis-5.2.1.tgz
cd redis-5.2.1
/home/wwwroot/php/bin/phpize
./configure --with-php-config=/home/wwwroot/php/bin/php-config
make && make install


3、修改php.ini添加扩展,然后重启服务

extension = redis.so
/etc/init.d/php-fpm restart

php -m中无法看到的解决办法,请参考

http://www.netljc.com/article/detail-44


php使用redis相关的文档介绍:
https://github.com/phpredis/phpredis


redis在linux下的安装教程:

https://www.netljc.com/article/detail-48

关键字centos linux redis