码迷,mamicode.com
首页 > Windows程序 > 详细

Redis On Windows

时间:2014-11-27 14:06:41      阅读:230      评论:0      收藏:0      [点我收藏+]

标签: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         # aof
redis-check-dump.exe        # dump
redis-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 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,成功.

 
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

 

Redis On Windows

标签:style   blog   http   io   ar   color   os   sp   for   

原文地址:http://www.cnblogs.com/Magicworks/p/4126111.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!