zoukankan      html  css  js  c++  java
  • Redis 安全性设置

    redis安装好后,默认情况下登陆客户端和使用命令操作时不需要密码的。某些情况下,为了安全起见,我们可以设置在客户端连接后进行任何操作之前都要进行密码验证。

    我这边是安装的window系统,修改redis.windows.conf配置文件

    # Require clients to issue AUTH <PASSWORD> before processing any other
    # commands.  This might be useful in environments in which you do not trust
    # others with access to the host running redis-server.
    #
    # This should stay commented out for backward compatibility and because most
    # people do not need auth (e.g. they run their own servers).
    # 
    # Warning: since Redis is pretty fast an outside user can try up to
    # 150k passwords per second against a good box. This means that you should
    # use a very strong password otherwise it will be very easy to break.
    #
    # requirepass foobared
    requirepass hongda$123456

    设置requirepass就可以

    接下来要重启Redis服务

    客户端授权方式

    (1)登录时使用-a参数指定客户端密码,如下

    (2)登录客户端后使用auth命令进行授权,如下

    http://www.cnblogs.com/hjwublog/p/5660578.html

  • 相关阅读:
    [HNOI2002]营业额统计 (Splay)
    [POJ1664] 放苹果 (动态规划,组合数学)
    [AHOI2009]维护序列 (线段树)
    类型转换求和
    懒人创造方法
    编程的精义
    10-instanceof
    9-接口
    6-SUPER关键字
    5-重写与重载
  • 原文地址:https://www.cnblogs.com/hongdada/p/5753176.html
Copyright © 2011-2022 走看看