1 Redis安装

 

在网址http://redis.io/下载redis-3.2.3.tar.gz,解压。

进入解压目录 编译和安装,具体配置项可参考自带的README.md文件

make test
make install

 

2 启动

开启服务:   redis-server --protected-mode no &
客户端连接: redis-cli
停止redis服务: redis-cli shutdow
[2] 4418
[sms@gc64 redis]$ 4418:M 30 Aug 16:58:12.425 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
4418:M 30 Aug 16:58:12.425 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
4418:M 30 Aug 16:58:12.425 # Current maximum open files is 1024. maxclients has been reduced to 992 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 3.2.3 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                   
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 4418
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           http://redis.io        
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

4418:M 30 Aug 16:58:12.426 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
4418:M 30 Aug 16:58:12.426 # Server started, Redis version 3.2.3
4418:M 30 Aug 16:58:12.426 # 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.
4418:M 30 Aug 16:58:12.426 * The server is now ready to accept connections on port 6379
启动信息

相关文章: