如何安装php的redis扩展-PHP问题

资源魔 22 0

php装置php的redis扩大的办法:

1. 装置redis

  Redis装置流程请移步 https://www.cnblogs.com/IT-Crowd/articles/10626765.html

2. 下载Redis扩大

 [root@root php-extension]# wget https://pecl.php.net/get/redis-4.3.0.tgz

3. 解压 tar -zxvf redis-4.3.0.tgz

[root@root php-extension]# tar -zxvf redis-4.3.0.tgz

4. 天生configure设置装备摆设文件

 [root@root php-extension]# cd redis-4.3.0
 [root@root redis-4.3.0]# /usr/local/php/bin/phpize

5.装置redis扩大

  [root@root redis-4.3.0]# ./configure --with-php-config=/usr/local/php/bin/php-config
 [root@root redis-4.3.0]# make && make install

  装置实现提醒:

    Build complete.
    Don't forget to run 'make test'.

    Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20170718/

6.正在php.ini中增加Redis扩大

  起首设置装备摆设extension_dir:

extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20170718/"

  正在extension_dir上面增加 extension = redis.so

7.重启PHP

 [root@root redis-4.3.0]# service php-fpm restart

8.Redis扩大装置胜利

2.png相干参考:资源魔

以上就是若何装置php的redis扩大的具体内容,更多请存眷资源魔其它相干文章!

标签: php php教程 php故障解决 php使用问题

抱歉,评论功能暂时关闭!