1、下载稳定版本
wget https://pecl.php.net/get/redis-6.0.2.tgz
tar -zxvf redis-6.0.2.tgz
cd redis-6.0.2
2、编译安装
# 生成 configure 脚本
phpize
# 配置编译选项(默认安装路径)
./configure --with-php-config=/usr/local/php/bin/php-config
# 编译并安装
make
sudo make install
3、php.ini添加扩展
extension=redis.so
4、重启php-fpm