码迷,mamicode.com
首页 > 其他好文 > 详细

Redis 单机部署

时间:2014-10-29 10:33:41      阅读:190      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   io   color   os   ar   sp   div   

1、下载:
  wget http://download.redis.io/releases/redis-2.8.4.tar.gz 2、解压
tar xzvf redis-2.8.4.tar.gz -C
/home/hadoop/zk cd /home/hadoop/zk/redis-2.8.4 sudo make PREFIX=/home/hadoop/zk/redis-2.8.4 install
3、进入目录 bin下执行
./redis-server --port 9999
 bin]$ ./redis-server --port 9999
[21365] 29 Oct 09:22:22.741 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 3984.
                _._                                                  
           _.-``__ ‘‘-._                                             
      _.-``    `.  `_.  ‘‘-._           Redis 2.8.4 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ‘‘-._                                   
 (    ‘      ,       .-`  | `,    )     Running in stand alone mode
 |`-._`-...-` __...-.``-._|‘` _.-‘|     Port: 9999
 |    `-._   `._    /     _.-‘    |     PID: 21365
  `-._    `-._  `-./  _.-‘    _.-‘                                   
 |`-._`-._    `-.__.-‘    _.-‘_.-‘|                                  
 |    `-._`-._        _.-‘_.-‘    |           http://redis.io        
  `-._    `-._`-.__.-‘_.-‘    _.-‘                                   
 |`-._`-._    `-.__.-‘    _.-‘_.-‘|                                  
 |    `-._`-._        _.-‘_.-‘    |                                  
  `-._    `-._`-.__.-‘_.-‘    _.-‘                                   
      `-._    `-.__.-‘    _.-‘                                       
          `-._        _.-‘                                           
              `-.__.-‘     

4、测试

./redis-cli -h master -p 9999
master:9999> set name zhanggl
OK
master:9999> get name
"zhanggl"
master:9999> get username
(nil)
master:9999> set sex 男
OK
master:9999> get sex
"\xe7\x94\xb7"
master:9999> 

 参考资料:http://redis.io/documentation

 


Redis 单机部署

标签:style   blog   http   io   color   os   ar   sp   div   

原文地址:http://www.cnblogs.com/zhanggl/p/4058615.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!