Installing Redis under Windows
Redis is officially supported for Linux, but Redis officially does not officially support Windows, and only Microsoft Open Tech Group has developed a Win64 version on GitHub with the project address:https:// Github.com/msopentech/redis
1. Download the installation files as follows
2. In the Release page, you can find the MSI installation file and the. zip file download Decompression, there is nothing to say, in the extracted bin directory under the following these files:
Redis-benchmark.exe #基准测试
Redis-check-aof.exe # AOF
Redis-check-dump.exe # Dump
Redis-cli.exe # Client
Redis-server.exe # Server
REDIS.WINDOWS.CONF # configuration file
3, the implementation of Redis-x64-3.2.100.msi installation files, will pop up the installation interface has set the port number and the maximum memory settings, strange these settings altogether run to redis.windows-service.conf configuration file
4. Start the Redis Service cmd window to execute commands such as:
Note the command to start Redis is: Redis-server.exe redis.windows.conf
5, in the installation directory to create a bat file (named arbitrarily like: Startredis.bat) file can be started directly, the contents of the file are as follows: D:\Program Files\redis for the installation directory
@echo off
cd\
D:
CD D:\Program Files\redis
Redis-server redis.windows.conf
6, connect Redis test and add data, double hit Open Redis-cli.exe , if not error, then connected to the local server, and then test, such as the SET command, get command:
127.0.0.1:6379> Set ZMCAAAA 123232
Ok
127.0.0.1:6379> Get ZMCAAAA
"123232"
127.0.0.1:6379>
7, the above test success is said that the Redis server is installed and the test can be directly used without the operation of this step, but there is a flaw console can not be shut down, whether it is possible for Redis to run in Windows services? The answer is yes.
A Windows service is automatically installed on the Windows service after the redis3.2.1 version is installed, but this service is not available because the service uses the redis.windows.service.conf configuration file, so you need to use the command first ( Redis-server--service-uninstall) Uninstall this service and reinstall it as follows:
Use command after success (Redis-Server -service-install Redis. Windows. conf) To reinstall the Redis service and start (redis-Server -service-start) such as:
Additional issues that occur with the installation:
1, If the Windows system is not administrator users, there will be a variety of problems, service installation can not start and so on, you should be able to modify the properties of the service--login users and other options to correct
2, prompt maxheap have the problem such as prompt: The Windows version of Redis allocates a large memory mapped file for sharing workaround
Open the configuration file redis.windows.conf in the installation directory , search for maxheap , and then specify the content directly.
.......
#
# Maxheap <bytes>
Maxheap 1024000000
.......
Installing Redis under Window