下载地址:https://github.com/MSOpenTech/redis/releases。
运行 redis-server.exe redis.windows.conf
解决方案如下按顺序输入如下命令就可以连接成功
1. Redis-cli.exe2. shutdown3. exit4. redis-server.exe redis.windows.conf
启动redis
redis-server.exe redis.windows.conf
新开一个dos窗口
切换到redis目录下运行 redis-cli.exe -h 127.0.0.1 -p 6379 。
设置键值对 set myKey abc
取出键值对 get myKey
Redis 的配置文件位于 Redis 安装目录下,文件名为 redis.conf。
redis 127.0.0.1:6379> CONFIG GET loglevel 1) "loglevel" 2) "notice"
原因: 没有启动 Redis 服务
转载于:https://www.cnblogs.com/mabylove/p/7274544.html
相关资源:JAVA上百实例源码以及开源项目