redis允许远程访问
打开redis.conf文件在NETWORK部分有说明
1)打开配置文件把下面对应的注释掉
# bind 127.0.0.1
bind 0.0.0.0
2)Redis默认不是以守护进程的方式运行,可以通过该配置项修改,使用yes启用守护进程,设置为no
daemonize no
3)保护模式
protected-mode no
4) 设置密码(不必须)
在 #requirepass foobared
去掉 #
号变requirepass foobared
,注:foobared
是密码;