修改  redis.conf

  1、开放防火墙端口

  2、

# 允许任何主机连接、访问
bind 127.0.0.1 改为 bind 0.0.0.0
 
# 关闭保护模式
protected-mode yes 改为 protected-mode no
 
# 允许后台运行
daemonize no 改为 daemonize yes

# 改密码
requirepass 你的密码

  

 之后重启

  要是重启了还不能远程连接,试试命令行终端输入 config set requirepass 你的密码