91名师指路-头部
91名师指路

centos7 阿里云解决redis无法远程连接的问题

由于某些原因,现在不支持支付宝支付,如需要购买源码请加博主微信进行购买,微信号:13248254750

1 确认防火墙是否开启了6379端口

添加端口:firewall-cmd --zone=public --add-port=6379/tcp --permanent

刷新防火墙:firewall-cmd --reload

2 找到 redis.conf 文件

   1 bind 127.0.0.1改为绑定 bind 0.0.0.0

    2 protected-mode yes改为protected-mode no

3 如果你是阿里云的服务器,那么可能还需要在安全组中开启端口

4 在重启redis,即可。

cd /opt/redis-4.0.10/src
./redis-server /opt/redis-4.0.10/redis.conf


2019-09-23 11:40:24     阅读(1516)

名师出品,必属精品    https://www.91mszl.com

联系博主    
用户登录遮罩层
x

账号登录

91名师指路-底部