美文网首页工作生活
redis4.0.6使用问题

redis4.0.6使用问题

作者: 宝塔山上的猫 | 来源:发表于2019-06-29 18:54 被阅读0次

redis4.0.6

(error) DENIED Redis is running in protected mode because protected mode is enabled
Redis protected-mode 是3.2 之后加入的新特性,在Redis.conf的注释中,我们可以了解到,他的具体作用和启用条件
链接 redis 时只能通过本地 localhost (127.0.0.1)这个来链接,而不能用网络 ip(192.168..) 这个链接,问题然如果用网络ip 链接会报以下的错误:

(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 lookback 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 --portected-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.

是说处于保护模式,只能本地链接,我们需要修改配置文件../redis.conf

但是安装完 redis4.0.6 在目录中发现并没有 redis.config 文件,找了许久,发现在编译的文件夹中存在,copy 到 redis/bin 目录下。

1)打开配置文件把下面对应的注释掉

bind 127.0.0.1

2)Redis默认不是以守护进程的方式运行,可以通过该配置项修改,使用yes启用守护进程,设置为no

daemonize no

3)保护模式

protected-mode no 

4)最后关键的是: 没反应应该是你启动服务端的时候没有带上配置文件。你可以

./redis-server redis.conf 

相关文章

  • redis4.0.6使用问题

    redis4.0.6 (error) DENIED Redis is running in protected m...

  • redis4.0.6安装

    1、安装redis 第一步:下载redis安装包 wget http://download.redis.io/re...

  • Mac安装Redis4.0.6

    Mac版本:10.12.6 Python版本3.6.3 Redis简介 Redis是一个高性能的key-value...

  • centos7.3安装redis4.0.6

    Centos7.3安装Redis4.0.6具体操作 准备工作 准备服务器,我这里采用的是阿里云的centos7.3...

  • Mac 10.13.2安装Redis4.0.6

    Redis个环境安装 下载地址: https://redis.io/download wget: http://d...

  • centos7 redis4.0.6 简易安装

    环境 centos7redis4.0.6 step1. redis参考 step2. 外网访问配置 step3. ...

  • Echarts使用问题问题集合

    一:Echarts使用问题--Y轴文字被遮住的解决办法 问题:今天要解决的是Y轴文字被遮住的问题。 被遮住的样式:...

  • VMWare 使用问题

    找不到可以连接的有效对等进程 VMware Fusion 10Pro 在启动虚拟机提示 找不到可以连接的有效对等...

  • 使用问题说明

    1.在使用 git clone 或其他命令的时候,有时候会遇到这类问题,如下: 出现这个问题是因为没有在githu...

  • pytorch使用问题

    pytorch用conda安装的版本比较旧,运行时候会有很多问题,用pip安装新版本之后问题自动消失 比如我碰到两...

网友评论

    本文标题:redis4.0.6使用问题

    本文链接:https://www.haomeiwen.com/subject/znzpcctx.html