1,关闭防火墙,或者将端口号加入防火墙开放
2,查看reids进程和端口,都是存在的。只是ip地址是127.0.0.1而不是0.0.0.0,只是本机能使用
查找redis的配置文件redis.conf
使用命令:find / -name redis.conf
查找bind 127.0.0.1所在的行数
使用命令:cat /usr/local/redis/bin/redis.conf|grep bin -n
编辑配置文件vim /usr/local/redis/bin/redis.conf
bind 127.0.0.1修改为bind 0.0.0.0
修改protected-mode,值改为no
重启redis服务