下面记录下php-redis扩展模块的安装过程:
php的安装目录是/Data/app/php5.6.26
下载phpredis,安装php-redis扩展模块
下载地址:https://pan.baidu.com/s/1sk9nz8D
提取密码:ahps
[root@dev src]# tar -zvxf nicolasff-phpredis-2.2.1-3-g950765e.tar.gz
[root@dev src]# mv nicolasff-phpredis-950765e phpredis
[root@dev src]# cd phpredis
[root@dev phpredis]# /Data/app/php5.6.26/bin/phpize
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
[root@dev phpredis]# ./configure --with-php-config=/Data/app/php5.6.26/bin/php-config
[root@dev phpredis]# make && make install
.......
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /Data/app/php5.6.26/lib/php/extensions/no-debug-non-zts-20131226/
修改php.ini文件
[root@dev phpredis]# vim /Data/app/php5.6.26/etc/php.ini
.......
extension="/Data/app/php5.6.26/lib/php/extensions/no-debug-non-zts-20131226/redis.so"
重启php-fpm服务
[root@dev phpredis]# pkill -9 php
[root@dev phpredis]# /Data/app/php5.6.26/sbin/php-fpm
[root@dev phpredis]# /Data/app/php5.6.26/bin/php -m
......
redis