Topshelf Packaging Redis for Windows services
The Redis server is currently running with a console program, and it feels better to run as a Windows service backend when deployed. Found an article running Redis as a Windows Service, implemented with Windows Installer. If you use Topshelf, it is not compatible with mono, so you write your own, the implementation is very simple, the code has been published on GitHub Redis-topshelf.
How do I use it?
1. Punch-in profile, the configuration file is described as follows:
Redis.service.name |
Service Name |
Redis.service.displayname |
Service Display Name |
Redis.service.description |
Service description |
Redis.server |
Redis Server Run file name |
Redis.conf |
Redis Profile Name |
Redis.cli |
Reids Client Path file name |
Redis.path |
Reids root directory |
If you are downloading the latest version of Redis, the Redis file name should be the same, just specify the root directory where the Reids is located.
2. Installing and uninstalling the WINDWOS service
Install the service execution file Install.bat, uninstall the service execution file Uninstall.bat.
The results are as follows:
Of course, you can also directly run the file Redis-topshelf.exe start the service as a console:
Topshelf Packaging Redis for Windows services