官方的是: http://redis.io/download
在win64一欄中可以看到redis原本是沒有windows版本的,windows版本是Microsoft Open Tech團隊開的
給出了一個github的連結地址: https://github.com/MSOpenTech/redis
下載:
在https://github.com/MSOpenTech/redis 頁面的右下角有 Download Zip的字樣,點擊之後就可以下載源碼的zip包了。
然後就是解壓: 這裡解壓的目錄是D:\devsofts\redis
啟動的程式在子目錄 D:\devsofts\redis\bin\release 下,一個是32位,一個是64位的。
配置和啟動:
在dos命令列環境下:
12345678910111213141516171819202122 |
D:\devsofts\redis>D:\devsofts\redis\bin\release\redis-server.exe redis.conf _._ _.-``__ '' -._ _.-`` `. `_. '' -._ Redis 2.6.12 (00000000 /0 ) 64 bit .-`` .-```. ```\/ _.,_ '' -._ ( ' , .-` | `, ) Running in stand alone mode |`-._`-...-` __...-.``-._| '` _.-' | Port: 6379 | `-._ `._ / _.-' | PID: 3792 `-._ `-._ `-./ _.- ' _.-' |`-._`-._ `-.__.- ' _.-' _.-'| | `-._`-._ _.- '_.-' | http: //redis .io `-._ `-._`-.__.- '_.-' _.-' |`-._`-._ `-.__.- ' _.-' _.-'| | `-._`-._ _.- '_.-' | `-._ `-._`-.__.- '_.-' _.-' `-._ `-.__.- ' _.-' `-._ _.-' `-.__.-' [3792] 01 May 23:58:25.400 # Server started, Redis version 2.6.12 [3792] 01 May 23:58:25.401 * The server is now ready to accept connections on po rt 6379 |
命令列所在的目錄是redis的根目錄
啟動的命令是bin下exe命令,這裡可以把
1 |
D:\devsofts\redis\bin\release\ |
添加到系統路徑中去。
測試:
使用用戶端程式訪問:
123456 |
D:\devsofts\redis>D:\devsofts\redis\bin\release\redis-cli.exe -h 192.168 . 0.106 - p 6379 redis 192.168 . 0.106 : 6379 > set admin orangleliu OK redis 192.168 . 0.106 : 6379 > get admin "orangleliu" |
後面開始學習簡單的使用,python串連redis的操作。