首先确保虚拟机防火墙已关闭
- ubuntu 中:
sudo ufw status // 查看防火墙状态,inactive状态是防火墙关闭状态 active是开启状态
sudo ufw disable // 关闭防火墙
- centos 中:
service iptables status // 查看防火墙状态
service iptables stop // 关闭防火墙
如防火墙已关闭则确认redis.conf中是否有限定IP
进入配置文件 sudo vi /etc/redis/redis.conf
添加 requirepass xxx xxx 为设定的密码
注释掉 bind 127.0.0.1
重启 sudo /etc/init.d/redis-server restart
此时使用Redis Desktop Manager连接提示成功