http://pecl.php.net/get/redis-2.2.5.tgz
[root@study package]# tar zxf redis-2.2.5.tgz -C ../
[root@study package]# cd ../redis-2.2.5/
[root@study redis-2.2.5]# /usr/local/php/bin/phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
[root@study redis-2.2.5]# ./configure --with-php-config=/usr/local/php/bin/php-config
[root@study redis-2.2.5]# make ; make install
[root@study redis-2.2.5]# mv /usr/local/php/lib/php/extensions/no-debug-zts-20100525/redis.so /usr/lib64/
[root@study redis-2.2.5]# vim /usr/local/php/php.ini
extension_dir = /usr/lib64/
extension = redis.so
[root@study ~]# /usr/local/php/bin/php -m | grep redis
redis
## 加载成功,可以重启 nginx 看看 phpinfo 页
转载于:https://www.cnblogs.com/hyit/articles/5170388.html