1、修改redis服务器的配置文件 默认的配置文件 redis.conf 设置是: 绑定本机地址:bind 127.0.0.1 开启保护模式:protected-mode yes 此时连接,服务器是拒绝的 此时连接会报错: Could not connect to Redis at 122.51.85.120:6379: Connection refused not con 因此,我们配置redis.conf, bind 0.0.0.0 protected-mode no 此时,重启redis,即可远程访问: