1.下载phpredis3.1.2
https://github.com/phpredis/phpredis/releases/tag/3.1.2
2.解压后在phpredis3.1.2目录下执行
/usr/local/php56/bin/phpize
3.执行configure
./configure --with-php-config=/usr/local/php56/bin/php-config
4.安装
make && make install
默认情形下将会在/usr/local/php56/lib/php/extensions/debug-non-zts-20131226/目录下生成redis.so文件
5.配置php.ini,在其最后加入
extension = /usr/local/php56/lib/php/extensions/debug-non-zts-20131226/redis.so
6.重启web 服务