I checked the Redis installation carefully recently. Previously, memcache was generally used. Redis installed in the Hangzhou project also opened a DOS window. When the DOS window is closed, the Redis service will be terminated, very troublesome. I want to install Redis as a service.
Download Redis before installation
The windows installation address is provided by the official staff indirectly on github.
Https://github.com/MSOpenTech/redis/releases
Directly attach the download address
My next version is redis-x64-3.0.500.zip.
Decompressed files
After decompression, I put the file to D: \ Program Files \ Redis-x64-3.0.500
Start Redis
Use DOS to enter the Redis directory, and then execute the command to start redis.
- Redis-server redis. windows. conf
In this way, the DOS window is closed after redis is started, and the redis service is stopped. If the project must use redis, it is not very troublesome.
Then install redis as a service.
Also, use DOS to enter the directory where Redis is stored and execute the following command
- Redis-server -- service-install redis. windows. conf
The prompt is successful. Check the windows service.
There will be one more Redis service in the service.
Redis can be distributed and can be simulated locally.
Install multiple redis instances
Redis-server -- service-install-service-name redisService1-port 10001
Redis-server -- service-install-service-name redisservice2-port 10002
The main difference is the service name for the port