windows under Redis installation
(Environment is windows8.1,64 bit)
(It is best to use administrator users to install the deployment, otherwise there will be some wonderful errors)
(Windows only supports 64-bit, 32-bit do not toss ... )
First, download and install Redis:
first of all, Redis officially does not support Windows, the original text is as follows:
win64 Span class= "Typ" style= "color:teal;" >unofficial The Project does not directly support windows
However the Open
an Windows port targeting Win64.
The main idea is that Redis officially does not support windows, but Microsoft Open Tech Group has developed a Win64 version on GitHub with the project address:Https://github.com/MSOpenTech/redis then, open the link above and go to GitHub to download it. such as (when the first use of GitHub, dead or alive can not find the download place, depressed)
Finally, the decompression.
Second, start Redis
Basic configuration files that need to be changed:
#端口号
port 6369
#日志级别
loglevel debug
#日志文件位置
logfile ./log/log6369.log
#dump文件位置
dbfilename dump6369.rdb
#工作目录,进过我的测试,对dump文件有效,对日志文件无效
dir ./data/redis6369/
#主从复制
slaveof 127.0.0.1 6379
1. Command start (cut to Redis directory)
F:\development\redis\redis3.0.501>redis-server redis6369.conf
2. As a system service
Registration Services
F:\development\redis\redis3.0.501>redis-server --service-install redis6369.conf --service-name redisServer6369
This is just a registered service, not yet started.
Start the service (requires Administrator privileges)Method One:
F:\development\redis\redis3.0.501>sc start redisServer6369
Method Two:
- F : \development\redis\redis3 . 0.501 >
Delete Service (requires Administrator privileges)
F:\development\redis\redis3.0.501>sc redisServer6369
third, encounter problems:
Question one, online to see, I did not encounter, because it is a memory problem, first recorded: error:
QForkMasterInit: system error caught. error code=0x000005af, message=VirtualAllocEx failed.: unknown error
Cause: Memory allocation problem (if your computer is tough enough, it may not be a problem)
Workaround: Method One: Add parameters when starting
Redis - Server Redis . Windows . --200m
Method Two: Configuration file plus parameters
209715200
question two, when Redis is served as a system
< Span class= "PLN" >f : \development\redis\redis3 0.501 \redis - server exe -- service - install F : \development\redis\redis3 0.501 \redis6369 conf -- service - name redisserver6369
Error:Could not open logfile./log/log6369.log: The system cannot find the path specified. Cause: The log file path and dump file path are configured because these paths are relative paths
WORKAROUND: You will need to run the disk segmentation to the Redis directory when registering the service.
From for notes (Wiz)
Windows under Redis installation