zoukankan      html  css  js  c++  java
  • redis 启动

    C:UsersAdministrator>cd c:

    c:>cd redis-2.6

    c: edis-2.6>redis-server.exe redis.conf

    测试redis

     
      1. redis-cli   
      2. redis 127.0.0.1:6379> set foo 123  
      3. OK  
      4. redis 127.0.0.1:6379> get foo  
      5. "123"  
      6. redis 127.0.0.1:6379> exit  

    4.关闭服务
    redis-cli shutdown
    如果端口变化可以指定端口:
    redis-cli -p 6379 shutdown
    127.0.0.1:6379> i+j
    Could not connect to Redis at 127.0.0.1:6379: Connection refused
    not connected> set w 3
    Could not connect to Redis at 127.0.0.1:6379: Connection refused
    not connected>

    5.启动服务
    [root@localhost src]# redis-server
    [24502] 28 Oct 01:54:35.784 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
    [24502] 28 Oct 01:54:35.784 * Increased maximum number of open files to 10032 (it was originally set to 1024).
                    _._                                                  
              _.-``__ ''-._                                            
          _.-``    `.  `_.  ''-._          Redis 2.8.13 (00000000/0) 64 bit
      .-`` .-```.  ```/    _.,_ ''-._                                  
     (    '      ,      .-`  | `,    )    Running in stand alone mode
     |`-._`-...-` __...-.``-._|'` _.-'|    Port: 6379
     |    `-._  `._    /    _.-'    |    PID: 24502
      `-._    `-._  `-./  _.-'    _.-'                                  
     |`-._`-._    `-.__.-'    _.-'_.-'|                                  
     |    `-._`-._        _.-'_.-'    |          http://redis.io        
      `-._    `-._`-.__.-'_.-'    _.-'                                  
     |`-._`-._    `-.__.-'    _.-'_.-'|                                  
     |    `-._`-._        _.-'_.-'    |                                  
      `-._    `-._`-.__.-'_.-'    _.-'                                  
          `-._    `-.__.-'    _.-'                                      
              `-._        _.-'                                          
                  `-.__.-'                                              
    [24502] 28 Oct 01:54:35.786 # Server started, Redis version 2.8.13
    [24502] 28 Oct 01:54:35.786 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
    [24502] 28 Oct 01:54:35.786 * DB loaded from disk: 0.000 seconds
    [24502] 28 Oct 01:54:35.786 * The server is now ready to accept connections on port 6379

  • 相关阅读:
    instance of type of object.prototype.tostring 区别
    字符串属性及方法大总结
    数组属性及方法大总结
    在Vue中遇到的各种坑 及性能提升
    find、filter、map的区别
    react 的CDN 连接
    react开启一个项目 webpack版本出错
    react中的jsx详细理解
    Vue 在beaforeCreate时获取data中的数据
    vue点击时动态改变样式 ------- 最简单的方法
  • 原文地址:https://www.cnblogs.com/jtlgb/p/5741969.html
Copyright © 2011-2022 走看看