ny3259 发表于 2015-11-12 13:36:52

【Redis入门】安装、启动

Installation
Download, extract and compile Redis with:
$ wget http://redis.googlecode.com/files/redis-2.4.7.tar.gz
$ tar xzf redis-2.4.7.tar.gz
$ cd redis-2.4.7
$ make
The binaries that are now compiled are available in the src directory. Run Redis with:
$ src/redis-server
You can interact with Redis using the built-in client:
$ src/redis-cli
redis> set foo bar
OK
redis> get foo
"bar"#关闭服务
$ redis-cli shutdown   

#关闭指定端口的redis-server

$redis-cli -p 6380 shutdown
  
  

  
  Redis安装完成之后,会生成四个文件,如下:
  
redis-server、redis-cli、redis-benchmark、redis-stat,它们的作用如下:

[*]redis-serverRedis服务器的daemon启动程序
[*]redis-cliRedis命令行操作工具。当然,你也可以用telnet根据其纯文本协议来操作
[*]redis-benchmarkRedis性能测试工具,测试Redis在你的系统及你的配置下的读写性能
[*]redis-statRedis状态检测工具,可以检测Redis当前状态参数及延迟状况

  非常简单啊! (其实使用也很方便)

   
版权声明:本文为博主原创文章,未经博主允许不得转载。
页: [1]
查看完整版本: 【Redis入门】安装、启动