redis 安裝測試

參考https://my.oschina.net/lujianing/blog/204103(Windows下Redis的安裝使用)java

發現3.0版本須要經過vs去編譯。機器沒裝編譯器,只好用了2.6git

https://github.com/MSOpenTech/redis/tree/2.6github

在這個路徑https://github.com/MSOpenTech/redis/tree/2.6/bin/release有執行文件。redis

下載,解壓以後,點擊redis-server.exe執行。服務器

[1368] 27 Nov 23:24:43.885 # Warning: no config file specified, using the defaul
t config. In order to specify a config file use E:\redis-2.6\bin\release\redisbi
n64\redis-server.exe /path/to/redis.conf
                _._
           _.-``__ ''-._
      _.-``    `.  `_.  ''-._           Redis 2.6.12 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._
 (    '      ,       .-`  | `,    )     Running in stand alone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 1368
  `-._    `-._  `-./  _.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |           http://redis.io
  `-._    `-._`-.__.-'_.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |
  `-._    `-._`-.__.-'_.-'    _.-'
      `-._    `-.__.-'    _.-'
          `-._        _.-'
              `-.__.-'測試

[1368] 27 Nov 23:24:43.900 # Server started, Redis version 2.6.12
[1368] 27 Nov 23:24:43.900 * The server is now ready to accept connections on po
rt 6379spa

使用CMD命令提示符,打開redis-cli鏈接redis服務器 ,也能夠使用telnet客戶端.net

# redis-cli -h 服務器 –p 端口 –a 密碼server

redis-cli.exe -h 127.0.0.1 -p 6379

鏈接成功後,就可對redis數據增刪改查了,如字符串操做:blog

另外開一個cmd

操做

E:\redis-2.6\bin\release\redisbin64>redis-cli.exe -h 127.0.0.1 -p 6379\
redis 127.0.0.1:6379> set test "helloworld"
OK
redis 127.0.0.1:6379> get test
"helloworld"
redis 127.0.0.1:6379>

 

java junit測試

wiki https://github.com/xetorthio/jedis/wiki/Getting-started 

相關文章
相關標籤/搜索