redis安装,redis c++客户端,redis cluster集群测试

redis2.9.9以后版本及以后开始支持cluster,而当前稳定版本2.8.5还不支持集群,故本次使用最新开发版本redis测试验证

1.redis安装使用

(1)下在redis,https://github.com/antirez/redis/tree/unstable,可以用git下载,也可以直接点右下方的DownloadZip

(2)解压unzip redis-unstable.zip

(3)编译,进入redis目录cdredis-unstable ,make, make完成后可以执行maketest查看编译是否成功,makeinstall安装,或者将redis-unstable/src目录添加到path

如:exportredis=/home/nohack/software/redis-unstable
exportPATH=$PATH:${redis}/src

(4)测试验证是否安装成功

开启一个终端:输入redis-server

本次使用默认端口6379,正常显示如下:

[2939] 08 Feb 16:41:33.207 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
[2939] 08 Feb 16:41:33.208 * Max number of open files set to 10032
                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 2.9.11 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                   
 (    '      ,       .-`  | `,    )     Running in stand alone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 2939
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           http://redis.io        
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

[2939] 08 Feb 16:41:33.210 # Server started, Redis version 2.9.11
[2939] 08 Feb 16:41:33.210 # 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.
[2939] 08 Feb 16:41:33.219 * DB loaded from disk: 0.009 seconds
[2939] 08 Feb 16:41:33.219 * The server is now ready to accept connections on port 6379

开启一个终端:输入redis-cli
127.0.0.1:6379> 
       
  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值