redis历程

 

Window 下安装

下载地址:https://github.com/MSOpenTech/redis/releases

运行 redis-server.exe redis.windows.conf 

报错: creating server tcp listening socket 127.0.0.1:6379: bind No error

解决方案如下按顺序输入如下命令就可以连接成功

1. Redis-cli.exe
2. shutdown
3. exit
4. 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 安装目录下,文件名为 redis.conf。

redis 127.0.0.1:6379> CONFIG GET loglevel

1) "loglevel"
2) "notice"

报错:Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool

原因: 没有启动 Redis 服务

原文地址:https://www.cnblogs.com/mabylove/p/7274544.html