无限制访问只需要把bind注释掉:
# bind 127.0.0.1
注释掉后任何一台服务器都可以访问,不过不安全可以在测试环境使用,也可以使用服务商的防火墙(安全组)限制访问端口ip
加入支持多台服务器访问
bind 127.0.0.1 8.8.8.8 114.114.114.114
edis3.2之后,redis增加了protected-mode,即使注释掉了bind 127.0.0.1也还是不行
可以修改配置为:
protected-mode no
修改后重启redis
关闭:
pkill redis
启动:
redis-server /usr/local/redis/redis-stable/redis.conf
或者用另一种方式启动:
redis-server &