RedisDesktopManager连接远程Linux系统的Redis服务,CentOS7关闭防火墙

连接失败;在Linux上修改redis.conf文件

RedisDesktopManager连接远程Linux系统的Redis服务,CentOS7关闭防火墙

首先查看一下Linux上Redis的进程,后面为redis-server 127.0.0.1:6379(很显然这是连接不上的)

RedisDesktopManager连接远程Linux系统的Redis服务,CentOS7关闭防火墙

注释掉69行本地链接限制(行号可能会不一致,因为版本号不一样内容不一样)

# bind 127.0.0.1

RedisDesktopManager连接远程Linux系统的Redis服务,CentOS7关闭防火墙

和88行配置修改为no 

protected-mode no

RedisDesktopManager连接远程Linux系统的Redis服务,CentOS7关闭防火墙

以及#requirepass foobared去掉注释,foobared改为自己的密码

RedisDesktopManager连接远程Linux系统的Redis服务,CentOS7关闭防火墙

 停止redis任务

[[email protected] ~]# redis-cli SHUTDOWN

 将其重启,查看任务,这个时候就变成,redis-server *:6379,这个时候连接,可能你已经连接上去了,如果还连接不上,那就把Linux防火墙关闭;

RedisDesktopManager连接远程Linux系统的Redis服务,CentOS7关闭防火墙

CentOS7关闭防火墙 

firewall-cmd --state       #查看默认防火墙状态(关闭后显示not running,开启后显示running)

systemctl stop firewalld.service #停止防火墙

systemctl disable firewalld.service #禁止防火墙开机启动

[[email protected] ~]# firewall-cmd --state
running
[[email protected] ~]# systemctl stop firewalld.service
[[email protected] ~]# firewall-cmd --state
not running
[[email protected] ~]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[[email protected] ~]#

关闭防火墙后,再次测试,就可以了