標籤:style blog http io ar color os sp for
Microsoft Open Tech group 在 GitHub上開發了一個REDIS Win64的版本,項目地址是:https://github.com/MSOpenTech/redis
可以在項目首頁右邊找到 zip包: https://github.com/MSOpenTech/redis/archive/2.8.zip
下載解壓,沒什麼好說的,在解壓後的bin目錄下有以下這些檔案:
redis-benchmark.exe #基準測試redis-check-aof.exe # aofredis-check-dump.exe # dumpredis-cli.exe # 用戶端redis-server.exe # 伺服器redis.windows.conf # 設定檔
參考RedisService.docx 檔案,啟動指令碼如下:
redis-server redis.windows.conf
D:\redis-2.8.17>redis-server.exe redis.windows.conf[4692] 27 Nov 12:14:05.995 #The Windows version of Redis allocates a memory mapped heap for sharing withthe forked process used for persistence operations. In order to share thismemory, Windows allocates from the system paging file a portion equal to thesize of the Redis heap. At this time there is insufficient contiguous freespace available in the system paging file for this operation (Windows error0x5AF). To work around this you may either increase the size of the systempaging file, or decrease the size of the Redis heap with the --maxheap flag.Sometimes a reboot will defragment the system paging file sufficiently forthis operation to complete successfully.Please see the documentation included with the binary distributions for moredetails on the --maxheap flag.Redis can not continue. Exiting.
根據提示,是 maxheap 標識有問題,開啟設定檔 redis.windows.conf ,搜尋 maxheap , 然後直接指定好內容即可.
# maxheap <bytes>maxheap 1024000000
然後再次啟動,OK,成功.
D:\redis-2.8.17>redis-server.exe redis.windows.conf _._ _.-``__ ‘‘-._ _.-`` `. `_. ‘‘-._ Redis 2.8.17 (00000000/0) 64 bit .-`` .-```. ```\/ _.,_ ‘‘-._ ( ‘ , .-` | `, ) Running in stand alone mode |`-._`-...-` __...-.``-._|‘` _.-‘| Port: 6379 | `-._ `._ / _.-‘ | PID: 2700 `-._ `-._ `-./ _.-‘ _.-‘ |`-._`-._ `-.__.-‘ _.-‘_.-‘| | `-._`-._ _.-‘_.-‘ | http://redis.io `-._ `-._`-.__.-‘_.-‘ _.-‘ |`-._`-._ `-.__.-‘ _.-‘_.-‘| | `-._`-._ _.-‘_.-‘ | `-._ `-._`-.__.-‘_.-‘ _.-‘ `-._ `-.__.-‘ _.-‘ `-._ _.-‘ `-.__.-‘[2700] 27 Nov 12:15:44.958 # Server started, Redis version 2.8.17[2700] 27 Nov 12:15:44.958 * DB loaded from disk: 0.000 seconds[2700] 27 Nov 12:15:44.958 * The server is now ready to accept connections on port 6379
Redis On Windows