Redis On Windows

Microsoft Open Tech group 在 GitHub上開發了一個REDIS Win64的版本,項目地址是:https://github.com/MSOpenTech/redisgit

能夠在項目主頁右邊找到 zip包下載地址: https://github.com/MSOpenTech/redis/archive/2.8.zipgithub

下載解壓,沒什麼好說的,在解壓後的bin目錄下有如下這些文件:redis

redis-benchmark.exe         #基準測試
redis-check-aof.exe         # aof
redis-check-dump.exe        # dump
redis-cli.exe               # 客戶端
redis-server.exe            # 服務器
redis.windows.conf          # 配置文件

參考RedisService.docx 文件,啓動腳本以下:windows

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 with
the forked process used for persistence operations. In order to share this
memory, Windows allocates from the system paging file a portion equal to the
size of the Redis heap. At this time there is insufficient contiguous free
space available in the system paging file for this operation (Windows error
0x5AF). To work around this you may either increase the size of the system
paging file, or decrease the size of the Redis heap with the --maxheap flag.
Sometimes a reboot will defragment the system paging file sufficiently for
this operation to complete successfully.

Please see the documentation included with the binary distributions for more
details on the --maxheap flag.

Redis can not continue. Exiting.

根據提示,是 maxheap 標識有問題,打開配置文件 redis.windows.conf ,搜索 maxheap , 而後直接指定好內容便可.服務器

# maxheap <bytes>
maxheap 1024000000

而後再次啓動,OK,成功.app

 
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 po
rt 6379
相關文章
相關標籤/搜索