• 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>

  • 相关阅读:
    简易聊天客户端程序
    java 多线程使用方法及Socket的使用
    跟着音乐节奏随机的产生不同颜色形状的图形
    移动小圆圈
    在一个frame设置四个组件
    触发按钮改变panel面板上的小圆圈颜色
    借助bootstrap框架模仿airbnb写的网页
    攻击DotCom小游戏
    mit java open course assignment #4
    FPS 游戏实现GDI透视
  • 原文地址:https://www.cnblogs.com/songyuejie/p/6920069.html
Copyright © 2020-2023  润新知