Redis开启远程访问:
找到安装目录下的redis.conf
bind 0.0.0.0 #修改为这个
port 6379 #redis端口
daemonize yes #修改这个为yes,以守护进程的方式运行,就是关闭了远程连接窗口,redis依然运行
protected-mode no #将protected-mode模式修改为no
requirepass password #设置需要密码才能访问,password修改为你自己的密码
1、关闭protected-mode模式,此时外部网络可以直接访问
2、开启protected-mode保护模式,需配置bind ip或者设置访问密码
重启:./redis-server ../redis.conf