全網最簡潔最快速PHP安裝Redis擴展

擴展下載地址http://pecl.php.net/package/redis

通過wget下載擴展

<code>wget http://pecl.php.net/get/redis-4.2.0.tgz/<code>

解壓然後進入目錄執行phpize

<code> tar -zxvf redis-4.2.0.tgz /<code>


全網最簡潔最快速PHP安裝Redis擴展

autoconf

出現上面情況是應為沒有安裝autoconf,安裝命令如下

<code>yum install autoconf/<code>

然後在執行phpize就好了


全網最簡潔最快速PHP安裝Redis擴展

phpize

然後執行如下命令,切記--with-php-config按照自己實際情況填寫

<code>./configure --with-php-config=/home/php7-2-2/bin/php-config  #配置
make #編譯
make install #安裝/<code>


全網最簡潔最快速PHP安裝Redis擴展

install

在php.ini文件中添加

<code>extension=redis/<code>

通過php -m命令進行驗證


全網最簡潔最快速PHP安裝Redis擴展

php -m


分享到:


相關文章: