首页 > 技术文章 > redis window环境下的安装地址

xmyxm 2016-03-24 15:36 原文

https://github-cloud.s3.amazonaws.com/releases/3402186/25358446-c083-11e5-89cb-61582694855e.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160321%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160321T065101Z&X-Amz-Expires=300&X-Amz-Signature=5daa5cf6186113c126fde40aa475ab3b42ae57f03f1f0fafb6da99b4e2822cad&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3DRedis-x64-2.8.2400.zip&response-content-type=application%2Foctet-stream

使用步骤:

第一步:cmd命令中指定redis的安装目录(如:C:\Program Files\Redis-x64-2.8.2400>)

启动命令:redis-server redis.windows.conf

但是在cmd之中执行这行命令之后报错:

[plain] view plain copy 在CODE上查看代码片派生到我的代码片
D:\Develop\redis-2.8.12>redis-server.exe redis.windows.conf  
[7736] 10 Aug 21:39:42.974 #  
The Windows version of Redis allocates a large memory mapped file for sharing  
the heap with the forked process used in persistence operations. This file  
will be created in the current working directory or the directory specified by  
the 'dir' directive in the .conf file. Windows is reporting that there is  
insufficient disk space available for this file (Windows error 0x70).  
  
You may fix this problem by either reducing the size of the Redis heap with  
the --maxheap flag, or by starting redis from a working directory with  
sufficient space available for the Redis heap.  
  
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:\Develop\redis-2.8.12>redis-server  redis.windows.conf  
                _._  
           _.-``__ ''-._  
      _.-``    `.  `_.  ''-._           Redis 2.8.12 (00000000/0) 64 bit  
  .-`` .-```.  ```\/    _.,_ ''-._  
 (    '      ,       .-`  | `,    )     Running in stand alone mode  
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379  
 |    `-._   `._    /     _.-'    |     PID: 6736  
  `-._    `-._  `-./  _.-'    _.-'  
 |`-._`-._    `-.__.-'    _.-'_.-'|  
 |    `-._`-._        _.-'_.-'    |           http://redis.io  
  `-._    `-._`-.__.-'_.-'    _.-'  
 |`-._`-._    `-.__.-'    _.-'_.-'|  
 |    `-._`-._        _.-'_.-'    |  
  `-._    `-._`-.__.-'_.-'    _.-'  
      `-._    `-.__.-'    _.-'  
          `-._        _.-'  
              `-.__.-'  
  
[6736] 10 Aug 22:01:22.247 # Server started, Redis version 2.8.12  
[6736] 10 Aug 22:01:22.248 * The server is now ready to accept connections on port 6379  

 

推荐阅读