全网最简洁最快速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


分享到:


相關文章: