Redis之远程访问问题-yellowcong
来源:互联网 发布:手机淘宝热卖在哪里 编辑:程序博客网 时间:2024/06/05 16:05
我把redis安装在docker上面后,发现访问不上,后来发现,是redis.conf配置文件的问题,默认情况下,只能本地访问,绑定的是127.0.0.1端口,如果想远程访问,需要两部操作1、注释掉bind 127.0.0.1 ,2、修改
protected-mode yes
为protected-mode no
(这个地方的前提是,我把防火墙关掉了,不考虑防火墙的问题)
1、注释掉bind
如果bind选项为空的话,那会接受所有来自于可用网络接口的连接。
bind 192.168.1.101 表是接收来自192.168.1.101发送过来的请求。
在集群的情况下,必须绑定本机的ip,不然远程连接不上,默认走127.0.0.1
2、设定protected-mode
# Protected mode is a layer of security protection, in order to avoid that# Redis instances left open on the internet are accessed and exploited.## When protected mode is on and if:## 1) The server is not binding explicitly to a set of addresses using the# "bind" directive.# 2) No password is configured.## The server only accepts connections from clients connecting from the# IPv4 and IPv6 loopback addresses 127.0.0.1 and ::1, and from Unix domain# sockets.## By default protected mode is enabled. You should disable it only if# you are sure you want clients from other hosts to connect to Redis# even if no authentication is configured, nor a specific set of interfaces# are explicitly listed using the "bind" directive.protected-mode no
阅读全文
0 0
- Redis之远程访问问题-yellowcong
- Redis之单机安装-yellowcong
- Redis之集群安装-yellowcong
- Redis之集群删除-yellowcong
- Redis之Twemproxy 介绍与使用-yellowcong
- Elasticsearch之开启外网访问-yellowcong
- Linux Redis 远程访问
- redis开启远程访问
- redis开启远程访问
- redis无法远程访问
- redis 开启远程访问
- Redis:redis远程访问控制
- Redis之集群redis-trib.rb环境的搭建-yellowcong
- Docker之Weave网络问题-yellowcong
- Html之Combox选不上的问题-yellowcong
- Redis之Codis集群的搭建与使用-yellowcong
- 设置redis可以远程访问
- Redis安装和远程访问
- luogu1034[矩形覆盖]
- Android Studio报错usage of API documented as @since 1.8
- 图侦综合实战平台
- 【iOS逆向工程】从脱壳到获取源码
- Angular学习笔记(1)——TypeScript基础
- Redis之远程访问问题-yellowcong
- android 6.0以上权限设置
- bootstrap后台管理模板
- JavaWeb学习心得之HttpServletRequest对象
- Linux---another app is currently hold yum lock
- 使用命令行+代理更新Android SDK
- webpack-dev-server 2.8.1 无法在IE10正常工作
- 大型项目的Java的建议
- 使用sklearn进行集成学习——实践