Windows 下面 redis 发布为服务的官方方法
生活随笔
收集整理的這篇文章主要介紹了
Windows 下面 redis 发布为服务的官方方法
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
除了 NSSM 之外 另外一種方式感覺還是很好用的
redis-server --service-install redis.windows.conf --loglevel verbose感覺也可以 唯一指定 config文件。 這里因為與redis-server 在同一個目錄上面所以不需要加絕對路徑了。
Installing the Service ----------------------*--service-install*This must be the first argument on the redis-server command line. Arguments after this are passed in the order they occur to Redis when the service is launched. The service will be configured as Autostart and will be launched as "NT AUTHORITY\\NetworkService". Upon successful installation a success message will be displayed and Redis will exit.This command does not start the service.For instance:redis-server --service-install redis.windows.conf --loglevel verboseUninstalling the Service ------------------------*--service-uninstall*This will remove the Redis service configuration information from the registry. Upon successful uninstallation a success message will be displayed and Redis will exit.This does command not stop the service.For instance:redis-server --service-uninstallStarting the Service --------------------*--service-start*This will start the Redis service. Upon successful start, a success message will be displayed and Redis will begin running.For instance:redis-server --service-startStopping the Service --------------------*--service-stop*This will stop the Redis service. Upon successful termination a success message will be displayed and Redis will exit.For instance:redis-server --service-stopNaming the Service ------------------*--service-name **name***This optional argument may be used with any of the preceding commands to set the name of the installed service. This argument should follow the service-install, service-start, service-stop or service-uninstall commands, and precede any arguments to be passed to Redis via the service-install command.The following would install and start three separate instances of Redis as a service:redis-server --service-install --service-name redisService1 --port 10001redis-server --service-start --service-name redisService1redis-server --service-install --service-name redisService2 --port 10002redis-server --service-start --service-name redisService2redis-server --service-install --service-name redisService3 --port 10003redis-server --service-start --service-name redisService3
來源: https://raw.githubusercontent.com/MSOpenTech/redis/2.8/Redis%20on%20Windows.md
?
Installing the Service ----------------------*--service-install*This must be the first argument on the redis-server command line. Arguments after this are passed in the order they occur to Redis when the service is launched. The service will be configured as Autostart and will be launched as "NT AUTHORITY\\NetworkService". Upon successful installation a success message will be displayed and Redis will exit.This command does not start the service.For instance:redis-server --service-install redis.windows.conf --loglevel verboseUninstalling the Service ------------------------*--service-uninstall*This will remove the Redis service configuration information from the registry. Upon successful uninstallation a success message will be displayed and Redis will exit.This does command not stop the service.For instance:redis-server --service-uninstallStarting the Service --------------------*--service-start*This will start the Redis service. Upon successful start, a success message will be displayed and Redis will begin running.For instance:redis-server --service-startStopping the Service --------------------*--service-stop*This will stop the Redis service. Upon successful termination a success message will be displayed and Redis will exit.For instance:redis-server --service-stopNaming the Service ------------------*--service-name **name***This optional argument may be used with any of the preceding commands to set the name of the installed service. This argument should follow the service-install, service-start, service-stop or service-uninstall commands, and precede any arguments to be passed to Redis via the service-install command.The following would install and start three separate instances of Redis as a service:redis-server --service-install --service-name redisService1 --port 10001redis-server --service-start --service-name redisService1redis-server --service-install --service-name redisService2 --port 10002redis-server --service-start --service-name redisService2redis-server --service-install --service-name redisService3 --port 10003redis-server --service-start --service-name redisService3
來源: https://raw.githubusercontent.com/MSOpenTech/redis/2.8/Redis%20on%20Windows.md
?
轉載于:https://www.cnblogs.com/jinanxiaolaohu/p/10658103.html
總結
以上是生活随笔為你收集整理的Windows 下面 redis 发布为服务的官方方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: [转帖]Runtime, Engine,
- 下一篇: 生产上第一使用线程池后的总结与反思