redis官网是没有windows版本的,windows版本目前是微软在维护

目前最新稳定版是3.0.504,我们下载 Redis-x64-3.0.504.zip,解压到C:\Redis-x64-3.0.504

可以编辑redis.windows.conf文件设置内存大小,修改密码等功能

打开cmd,切换到redis目录

启动命令

redis-server.exe redis.windows.conf

然后另开一个cmd,切换到redis目录,连接redis

redis-cli.exe -h 127.0.0.1 -p 6379  
# 指定redis的ip和端口

测试

set xiaoming 123456  
# 设置key,value
get xiaoming  
# 得到key为xiaoming的value keys
*  
# 列出所有的key

 

 

可以将redis的目录添加进Path变量方便操作,win10下

  1)右键“此电脑”  --》  “属性”  --》  “高级系统设置”  --》  “高级”  --》  “环境变量”  --》  “系统变量”  

  2)选中Path  --》  ”编辑“  --》  ”新建“   --》  然后将redis目录C:\Redis-x64-3.0.504添加进去

 

将redis添加到系统服务中

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

 

相关文章:

  • 2022-01-16
  • 2021-08-07
  • 2021-10-30
  • 2022-12-23
  • 2021-11-22
  • 2021-07-24
  • 2021-10-06
  • 2021-12-03
猜你喜欢
  • 2021-08-25
  • 2021-12-14
  • 2021-09-06
  • 2021-07-18
  • 2021-05-28
  • 2022-12-23
相关资源
相似解决方案