redis.conf配置protected-mode/bind/requirepass

=>配置文件关于protected-mode的注释:

 

1.当bind和requirepass都注释时,protected-mode需要设置为no;

2.开启任意一个都需要设置成yes;

3.bind的是Redis服务器的网卡接口,而非可以访问redis服务器的IP;

  如通过命令 hostname -I 查看本机的网卡接口 192.168.0.1,192.168.1.254,那么bind设置如下:

    bind 127.0.0.1 192.168.0.1 192.168.1.254

posted @ 2021-03-18 10:58  stuka  阅读(751)  评论(0编辑  收藏  举报