• Linux 安装 Redis


    [root@localhost ~]# wget http://download.redis.io/releases/redis-2.8.3.tar.gz
    [root@localhost ~]# tar zxvf redis-2.8.3.tar.gz
    [root@localhost ~]# cd redis-2.8.3
    [root@localhost redis-2.8.3]# make
    [root@localhost redis-2.8.3]# mkdir  /usr/redis
    [root@localhost redis-2.8.3]# cd src/
    [root@localhost src]# cp redis-server /usr/redis/
    [root@localhost src]# cp redis-benchmark /usr/redis/
    [root@localhost src]# cp redis-cli /usr/redis/
    [root@localhost src]# cd ..
    [root@localhost redis-2.8.3]# cp redis.conf /usr/redis/
    [root@localhost redis-2.8.3]# cd /usr/redis/
    [root@localhost redis]# ./redis-server redis.conf
    [4444] 30 May 04:16:20.667 * Max number of open files set to 10032
                    _._                                                 
               _.-``__ ''-._                                            
          _.-``    `.  `_.  ''-._           Redis 2.8.3 (00000000/0) 64 bit
      .-`` .-```.  ```/    _.,_ ''-._                                  
     (    '      ,       .-`  | `,    )     Running in stand alone mode
     |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
     |    `-._   `._    /     _.-'    |     PID: 4444
      `-._    `-._  `-./  _.-'    _.-'                                  
     |`-._`-._    `-.__.-'    _.-'_.-'|                                 
     |    `-._`-._        _.-'_.-'    |           http://redis.io       
      `-._    `-._`-.__.-'_.-'    _.-'                                  
     |`-._`-._    `-.__.-'    _.-'_.-'|                                 
     |    `-._`-._        _.-'_.-'    |                                 
      `-._    `-._`-.__.-'_.-'    _.-'                                  
          `-._    `-.__.-'    _.-'                                      
              `-._        _.-'                                          
                  `-.__.-'                                              

    [4444] 30 May 04:16:20.863 # Server started, Redis version 2.8.3
    [4444] 30 May 04:16:20.890 # 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.
    [4444] 30 May 04:16:20.890 * The server is now ready to accept connections on port 6379
    [root@localhost redis]# ./redis-cli
    127.0.0.1:6379> set foo bar
    OK
    127.0.0.1:6379> get foo
    "bar"
    127.0.0.1:6379>

  • 相关阅读:
    笔记本Linux系统,修改合盖不待机
    用Java8把List转为Map
    获取本地请求的真实IP地址
    PowerDesigner 把Comment复制到name中和把name复制到Comment
    axios封装http请求
    Fiddler代理配置
    第十九章 代码重用
    第十八章 字符串
    第十七章 特殊类成员
    第十六章 多态性
  • 原文地址:https://www.cnblogs.com/songyuejie/p/6920069.html
Copyright © 2020-2023  润新知