Redis——配置允许远程连接
1、防火墙添加6379端口
确保防火墙开启了对6379端口的放行。
2、修改redis.conf
在 redis.conf 中修改以下参数
windows:
redis.windows-service.conf
redis.windows.conf
# 允许任何主机连接、访问
bind 127.0.0.1 改为 bind 0.0.0.0
# 关闭保护模式
protected-mode yes 改为 protected-mode no
# 允许启动后在后台运行,即关闭命令行窗口后仍能运行
daemonize no 改为 daemonize yes
修改完成后,重启redis,并指定配置文件
./redis-server ../redis.conf
评论
匿名评论
隐私政策
你无需删除空行,直接评论以获取最佳展示效果