linux下安装Redis

1
wget http://download.redis.io/releases/redis-2.8.17.tar.gz
(wget命令主要用于下载文件,这里是指从远程下载)

2
解压
tar xzf redis-2.8.17.tar.gz


cd redis-2.8.17

make

然后进入make,安装组件

3

cd redis-2.8.17/src
到src目录下执行命令./redis-server,出现以下信息表示Redis启动成功

[root@maer src]# ./redis-server
[5685] 26 Jul 12:19:27.022 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf
[5685] 26 Jul 12:19:27.026 * Increased maximum number of open files to 10032 (it was originally set to 1024).
[5685] 26 Jul 12:19:27.028 # Warning: 32 bit instance detected but no memory limit set. Setting 3 GB maxmemory limit with 'noeviction' policy now.
                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 2.8.17 (00000000/0) 32 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                   
 (    '      ,       .-`  | `,    )     Running in stand alone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 5685
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           http://redis.io        
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

[5685] 26 Jul 12:19:27.030 # Server started, Redis version 2.8.17
[5685] 26 Jul 12:19:27.030 # 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.
[5685] 26 Jul 12:19:27.030 * DB loaded from disk: 0.000 seconds
[5685] 26 Jul 12:19:27.030 * The server is now ready to accept connections on port 6379

4

在这个界面的,由会话1克隆会话2

5

在会话2中根路径先执行命令redis-cli,出现PONG表明,redis 服务已经启动。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值