Windows服务部署 [英] Windows Service Deployment
问题描述
我目前手动服务器上部署我的Windows服务。
I am currently deploying my windows services manually on the server.
一时间步骤:
- 服务器托管在Windows Server上安装的位置 - >
D:\ INSTALLDIR
- 复制Windows服务相关的文件到该文件夹
- 创建一个批处理文件来安装Windows服务(
InstallUtil.Exe
),另一个批处理文件卸载Windows服务,并在安装文件夹复制
使用安装批处理文件 - 在安装了Windows服务
- Install Location on server hosting windows server ->
D:\InstallDir
- Copied windows Service related files into this folder
- Created a batch file to Install Windows Service (
InstallUtil.Exe
) and another batch file to uninstall windows service and copied in the install folder - Installed windows service using the install batch file
下面是我的步骤进行升级:
Here are the steps I perform to upgrade:
- 在利用现有的安装文件夹(如果使用我需要回滚到preV版) 备份
- 运行卸载批处理文件来卸载Windows服务(
InstallUtil / U
) - 复制新的DLL从一个位置构建服务器到安装文件夹(在服务器上运行Windows的服务) 在
- 运行安装批处理文件来安装Windows服务(
InstallUtil WIndowsService.Exe
)
- Take backup of existing Install folder (to use in case I need to rollback to prev version)
- Run uninstall batch file to uninstall the windows service (
InstallUtil /u
) - Copy new DLLs from a location on build server into Install Folder (on server hosting windows services)
- Run install batch file to Install the windows service (
InstallUtil WIndowsService.Exe
)
我想自动升级步骤;你可以建议部署策略在这种情况下?
I would like to automate upgrade steps; can you suggest deployment strategy in this scenario?
推荐答案
有设立一个Windows服务安装项目步行通过。我用它和它的使用简单,易于创建。它创建了一个标准的.msi文件来安装。因为它是一个标准的安装项目创建一个标准的MSI,您可以将其设置为自动卸载previous版本等。
There's a walk through for setting up a Setup Project for a Windows Service. I've used it and it's simple to use and simple to create. It creates a standard .msi file to install from. Since it's a standard Setup project creating a standard msi, you can set it to automatically uninstall previous versions, etc.
http://support.microsoft.com/kb/317421
这篇关于Windows服务部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!