phpredis擴(kuò)展安裝總結(jié):
PHP擴(kuò)展安裝在[root@iZ254lfyd6nZ lampp]# cd include? 目錄下
創(chuàng)建一個(gè)目錄phpredis
下載擴(kuò)展:wget https://github.com/nicolasff/phpredis/archive/master.tar.gz
解壓:[root@iZ254lfyd6nZ phpredis]# tar xvf master.tar.gz
運(yùn)行:[root@iZ254lfyd6nZ phpredis-master]# /opt/lampp/bin/phpize
安裝GCC,避免下面的報(bào)錯(cuò):
[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
運(yùn)行:
[root@iZ254lfyd6nZ phpredis-master]# ./configure --with-php-config=/opt/lampp/bin/php-config
編譯+安裝:
[root@iZ254lfyd6nZ phpredis-master]# make && make install
重啟WEB服務(wù)器:
[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