123

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

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容