123

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

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容