zoukankan      html  css  js  c++  java
  • redis使用初体验

    一、启动redis服务命令

     1 C:>cd redis
     2 
     3 C:
    edis>dir
     4  驱动器 C 中的卷没有标签。
     5  卷的序列号是 A292-AC0A
     6 
     7  C:
    edis 的目录
     8 
     9 2017/07/18  09:48    <DIR>          .
    10 2017/07/18  09:48    <DIR>          ..
    11 2017/07/18  09:48                91 dump.rdb
    12 2016/07/01  16:27             1,024 EventLog.dll
    13 2016/07/01  16:07            12,509 Redis on Windows Release Notes.docx
    14 2016/07/01  16:07            16,727 Redis on Windows.docx
    15 2016/07/01  16:28           409,088 redis-benchmark.exe
    16 2016/07/01  16:28         4,370,432 redis-benchmark.pdb
    17 2016/07/01  16:28           257,024 redis-check-aof.exe
    18 2016/07/01  16:28         3,518,464 redis-check-aof.pdb
    19 2016/07/01  16:28           499,712 redis-cli.exe
    20 2016/07/01  16:28         4,526,080 redis-cli.pdb
    21 2016/07/01  16:28         1,666,560 redis-server.exe
    22 2016/07/01  16:28         7,081,984 redis-server.pdb
    23 2016/07/01  16:07            48,212 redis.windows-service.conf
    24 2016/07/01  16:07            48,201 redis.windows.conf
    25 2016/07/01  09:17            14,265 Windows Service Documentation.docx
    26               15 个文件     22,470,373 字节
    27                2 个目录 70,733,156,352 可用字节
    28 
    29 C:
    edis>redis-server.exe

    二、链接redis服务命令(打开新的cmd窗口,原来的cmd窗口不能关闭,窗口关闭,则服务停止)

     1 C:>dir
     2 驱动器 C 中的卷没有标签。
     3 卷的序列号是 A292-AC0A
     4 
     5 C: 的目录
     6 
     7 2016/07/15 18:28 1,024 .rnd
     8 2017/07/18 10:57 <DIR> activemq
     9 2017/07/04 13:56 <DIR> AMD
    10 2017/07/10 18:48 <DIR> Boot
    11 2017/07/26 18:55 <DIR> CommonFramework
    12 2016/05/04 09:51 <DIR> Drivers
    13 2017/07/04 12:08 <DIR> ESD
    14 2017/09/11 15:33 332 offline_FtnInfo.txt
    15 2009/07/14 11:20 <DIR> PerfLogs
    16 2017/09/15 13:50 <DIR> Program Files
    17 2017/09/26 14:26 <DIR> Program Files (x86)
    18 2017/07/18 09:48 <DIR> redis
    19 2017/06/29 10:16 <DIR> Ruby23-x64
    20 2017/06/26 14:26 26,228 SangforPromoteService.dmp
    21 2017/08/17 10:38 <DIR> SmartDraw 2017
    22 2017/09/18 16:50 <DIR> TIM
    23 2017/07/18 10:31 <DIR> tmp
    24 2017/09/15 13:58 1,850 unintall.log
    25 2016/05/04 09:59 <DIR> Users
    26 2017/09/27 13:51 <DIR> Windows
    27 2017/07/19 17:52 <DIR> zookeeper
    28 4 个文件 29,434 字节
    29 17 个目录 70,734,815,232 可用字节
    30 
    31 C:>cd redis
    32 
    33 C:
    edis>dir
    34 驱动器 C 中的卷没有标签。
    35 卷的序列号是 A292-AC0A
    36 
    37 C:
    edis 的目录
    38 
    39 2017/07/18 09:48 <DIR> .
    40 2017/07/18 09:48 <DIR> ..
    41 2017/07/18 09:48 91 dump.rdb
    42 2016/07/01 16:27 1,024 EventLog.dll
    43 2016/07/01 16:07 12,509 Redis on Windows Release Notes.docx
    44 2016/07/01 16:07 16,727 Redis on Windows.docx
    45 2016/07/01 16:28 409,088 redis-benchmark.exe
    46 2016/07/01 16:28 4,370,432 redis-benchmark.pdb
    47 2016/07/01 16:28 257,024 redis-check-aof.exe
    48 2016/07/01 16:28 3,518,464 redis-check-aof.pdb
    49 2016/07/01 16:28 499,712 redis-cli.exe
    50 2016/07/01 16:28 4,526,080 redis-cli.pdb
    51 2016/07/01 16:28 1,666,560 redis-server.exe
    52 2016/07/01 16:28 7,081,984 redis-server.pdb
    53 2016/07/01 16:07 48,212 redis.windows-service.conf
    54 2016/07/01 16:07 48,201 redis.windows.conf
    55 2016/07/01 09:17 14,265 Windows Service Documentation.docx
    56 15 个文件 22,470,373 字节
    57 2 个目录 70,734,815,232 可用字节
    58 
    59 C:
    edis>redis-cli.exe -h 127.0.0.1 -p 6379
    60 127.0.0.1:6379> CONFIG set requirepass root
    61 OK
    62 127.0.0.1:6379> CONFIG GET requirepass
    63 (error) NOAUTH Authentication required.
    64 127.0.0.1:6379> CONFIG GET requirepass
    65 (error) NOAUTH Authentication required.
    66 127.0.0.1:6379> auth root
    67 OK
    68 127.0.0.1:6379> CONFIG GET requirepass
    69 1) "requirepass"
    70 2) "root"
    71 127.0.0.1:6379>
  • 相关阅读:
    Best Time to Buy and Sell Stock III
    Valid Palindrome
    Longest Substring Without Repeating Characters
    Copy List with Random Pointer
    Add Two Numbers
    Recover Binary Search Tree
    Anagrams
    ZigZag Conversion
    Merge k Sorted Lists
    Distinct Subsequences
  • 原文地址:https://www.cnblogs.com/luohero/p/7602532.html
Copyright © 2011-2022 走看看