1、云服务器的端口6379开通
2、宝塔服务器上的6379开通
3、修改服务器上的redis配置文件:
# bind 127.0.0.1 注释掉
daemonize no 改为no
protected-mode no 改为no
重启redis
************至此redis就可以远程直接连接共同和使用了*********
再不行就连到服务器面板 netstat -ntpl 6379
如果是6379 是127.0.0.1 那么就表示没开放成功(上面那些步骤做完就不会出现了)