cd /usr/local/srcwget https://github.com/nicolasff/phpredis/archive/master.zipunzip master.zipcd phpredis-master /usr/local/php/bin/phpize ./configure --with-php-config=/usr/local/php/bin/php-config make make install #执行完make install后会生成 #Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/ #修改php.ini vi /etc/php.ini #查找extension_dir,修改为(734行) extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/" #添加redis(865行) extension = redis.so #重启nginx,php-fpm service nginx restart
原文地址:https://www.cnblogs.com/fengzhongzhuzu/p/8777502.html
时间: 2024-10-12 21:38:26