windows下 redis 配置安装+开启php redis 扩展

1,redis官方下载地址:https://redis.io/download,redis 64位下载地址:https://github.com/ServiceStack/redis-windows,本人测试使用的是redis-64.3.0.503版本。

解压一个版本 修改redis.windows.conf 文件 

修改 maxmemory 1024000000

设置redis密码   requirepass  你的密码

cdm 运行 redis-cil.exe redis.windows.conf     

2、设置服务命令

redis-server --service-install redis.windows-service.conf --loglevel verbose

redis服务启动的时候如果报错 1067    于是手动在redis-server.exe所在的目录中建立了子目录Logs,再次启动服务,一切正常。

3 开启php redis 扩展

redis.dll下载地址

1、http://windows.php.net/downloads/pecl/releases/redis/

2、https://pecl.php.net/package/redis

 

php_igbinary.dll 文件下载地址

http://windows.php.net/downloads/pecl/releases/igbinary/


根据phpinfo()信息选择适当的redis扩展压缩包

在php.ini中加  

extension=php_igbinary.dll    (这个必须在上面)
extension=php_redis.dll

开启php redis扩展。

重启php运行环境即可。

查看扩展是否安装成功

打印 phpinfo,搜索redis,有下图内容则开启扩展成功。

猜你喜欢

转载自blog.csdn.net/weixin_40896800/article/details/84672986