phpredis扩展安装总结:
PHP扩展安装在[root@iZ254lfyd6nZ lampp]# cd include 目录下
创建一个目录phpredis
下载扩展:wget https://github.com/nicolasff/phpredis/archive/master.tar.gz
解压:[root@iZ254lfyd6nZ phpredis]# tar xvf master.tar.gz
运行:[root@iZ254lfyd6nZ phpredis-master]# /opt/lampp/bin/phpize
安装GCC,避免下面的报错:
[root@iZ254lfyd6nZ phpredis-master]# /opt/lampp/bin/phpize
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
[root@iZ254lfyd6nZ phpredis-master]# ./configure --with-php-config=/opt/lampp/bin/php-config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... no
checking for gcc... no
configure: error: in `/opt/lampp/include/php/ext/phpredis/phpredis-master':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
[root@iZ254lfyd6nZ phpredis-master]# yum -y install gcc
运行:
[root@iZ254lfyd6nZ phpredis-master]# ./configure --with-php-config=/opt/lampp/bin/php-config
编译+安装:
[root@iZ254lfyd6nZ phpredis-master]# make && make install
重启WEB服务器:
[root@iZ254lfyd6nZ phpredis-master]# /opt/lampp/lampp stopapache
XAMPP: Stopping Apache...ok.
[root@iZ254lfyd6nZ phpredis-master]# /opt/lampp/lampp startapache
还有去配置PHP.ini的支持:
extension_dir = "/opt/lampp/lib/php/extensions/no-debug-non-zts-20131226"
extension=redis.so
https://www.cnblogs.com/kenshinobiy/p/4606937.html
http://blog.csdn.net/lzding/article/details/52040501