1.Jedis所需要的jar包
- Commons-pool-1.6.jar
- Jedis-2.1.0.jar
这里有jar包:https://download.youkuaiyun.com/download/gtjsjj/1264974
2.关闭防火墙,配置redis.conf
注:用windows中的Eclipse连接虚拟机的Redis的注意事项
- 1.禁用Linux的防火墙:
- 2.临时禁用:service iptables stop
- 3.关闭开机自启:chkconfig iptables off
- 4.redis.conf中注释掉bind 127.0.0.1(61行) ,然后 protect-mode(80行)设置为 no。
1)查看防火墙状态
命令:firewall-cmd --state