当前位置: 首页 > news >正文

redis开启远程访问

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

redis默认只允许本地访问,要使redis可以远程访问可以修改redis.conf

 

打开redis.conf文件在NETWORK部分有说明

 

 

解决办法:注释掉bind 127.0.0.1可以使所有的ip访问redis

若是想指定多个ip访问,但并不是全部的ip访问,可以bind

 

 

 

注意

下面还有个说明

在redis3.2之后,redis增加了protected-mode,在这个模式下,即使注释掉了bind 127.0.0.1,再访问redisd时候还是报错,如下

 

 

 

(error) DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are only accepted from the loopback interface. If you want to connect from external computers to Redis you may adopt one of the following solutions: 1) Just disable protected mode sending the command 'CONFIG SET protected-mode no' from the loopback interface by connecting to Redis from the same host the server is running, however MAKE SURE Redis is not publicly accessible from internet if you do so. Use CONFIG REWRITE to make this change permanent. 2) Alternatively you can just disable the protected mode by editing the Redis configuration file, and setting the protected mode option to 'no', and then restarting the server. 3) If you started the server manually just for testing, restart it with the '--protected-mode no' option. 4) Setup a bind address or an authentication password. NOTE: You only need to do one of the above things in order for the server to start accepting connections from the outside.

 

修改办法:protected-mode no

 

 

 

转载于:https://my.oschina.net/wangen2009/blog/1560961

相关文章:

  • AE与AO的区别
  • Java 并发集合的实现原理
  • 如何利用C++搭建个人专属的TensorFlow
  • 基于HAProxy的高性能缓存服务器nuster
  • [20171106]配置客户端连接注意.txt
  • 分享Silverlight/WPF/Windows Phone一周学习导读(07月25日-07月31日)
  • Python类的一般形式和继承
  • ArcGIS 10.5 新功能
  • 局域网内手机播放视频
  • Ubuntu Server 10.10 操作手记
  • JavaScript 基本功--面试宝典
  • Oracle Number用法
  • Linux下随机10字符病毒的清除
  • wbadmin执行备份命令
  • Oracle Study之案例--通过IPCS查看共享内存之“怪现象”
  • [LeetCode] Wiggle Sort
  • 「前端早读君006」移动开发必备:那些玩转H5的小技巧
  • Apache的80端口被占用以及访问时报错403
  • Bootstrap JS插件Alert源码分析
  • JavaScript设计模式之工厂模式
  • LeetCode算法系列_0891_子序列宽度之和
  • Python连接Oracle
  • session共享问题解决方案
  • SQLServer插入数据
  • Yii源码解读-服务定位器(Service Locator)
  • 机器人定位导航技术 激光SLAM与视觉SLAM谁更胜一筹?
  • 记一次和乔布斯合作最难忘的经历
  • 前端每日实战:61# 视频演示如何用纯 CSS 创作一只咖啡壶
  • 如何优雅地使用 Sublime Text
  • 扫描识别控件Dynamic Web TWAIN v12.2发布,改进SSL证书
  • LIGO、Virgo第三轮探测告捷,同时探测到一对黑洞合并产生的引力波事件 ...
  • 数据可视化之下发图实践
  • ​LeetCode解法汇总307. 区域和检索 - 数组可修改
  • ​卜东波研究员:高观点下的少儿计算思维
  • (C语言版)链表(三)——实现双向链表创建、删除、插入、释放内存等简单操作...
  • (function(){})()的分步解析
  • (Mac上)使用Python进行matplotlib 画图时,中文显示不出来
  • (ZT)一个美国文科博士的YardLife
  • (初研) Sentence-embedding fine-tune notebook
  • (二)pulsar安装在独立的docker中,python测试
  • (剑指Offer)面试题34:丑数
  • (接口封装)
  • .NET : 在VS2008中计算代码度量值
  • .net core 控制台应用程序读取配置文件app.config
  • .NET Core中Emit的使用
  • .Net IE10 _doPostBack 未定义
  • .NET开源的一个小而快并且功能强大的 Windows 动态桌面软件 - DreamScene2
  • .NET框架设计—常被忽视的C#设计技巧
  • .pub是什么文件_Rust 模块和文件 - 「译」
  • /var/spool/postfix/maildrop 下有大量文件
  • ::什么意思
  • @property python知乎_Python3基础之:property
  • @select 怎么写存储过程_你知道select语句和update语句分别是怎么执行的吗?
  • [ SNOI 2013 ] Quare
  • [ActionScript][AS3]小小笔记