Linux php7 上面是如何安装Redis扩展

1.下载Redis扩展

wget http://pecl.php.net/get/redis-3.1.6.tgz
2.解压

tar zxf redis-3.1.6.tgz
3.安装

1) cd redis-3.1.6    //进入安装目录
2) /usr/bin/phpize  
 //不知道路径的话,可以用whereis phpize命令查找
3) ./configure --with-php-config=/www/server/php/71/bin/php-config   
 //不知道路径的话,可以用 find / -name php-config查找
4) make && make install
5) make test
4.在PHP配置文件php.ini里面加载Redis扩展

extension=redis.so
5.重启服务

评论

暂无评论