简体   繁体   English

使用数据库和Windows服务为Web应用制作安装程序

[英]Making an installer for a web app with database and a windows service

I want to make an installer for a client which installs 我想为要安装的客户端制作安装程序

  1. a web app on IIS IIS上的Web应用程序
  2. a mssql db 一个mssql数据库
  3. a window service 窗户服务

I am totally naive to thinking of the solution for this automated deployment through an installer (msi or exe). 我完全天真地想到了通过安装程序(msi或exe)进行自动部署的解决方案。 The installer may hint the user for prerequisites for example MSSQL server and upgrading/installing IIS before the web app installation can proceed. 安装程序可能会提示用户提供先决条件,例如MSSQL服务器和升级/安装IIS,然后才能继续安装Web应用程序。 Is it possible? 可能吗?

Yes, it is possible. 对的,这是可能的。 You need to first select in an authoring tool for Windows Installer. 您需要首先在Windows Installer的创作工具中进行选择。 Some examples are Windows Installer XML (WiX) and InstallShield (various editions from free to pricey). 例如Windows Installer XML(WiX)和InstallShield(从免费到昂贵的各种版本)。 You'll have some kind of EXE bootstarpper/chainer where you can handle prerequisite installation such as windows features and database engines. 您将拥有某种EXE bootstarpper /链接器,可以在其中处理必备安装,例如Windows功能和数据库引擎。 Or you can choose to simply ship an MSI that detects and blocks if these are missing and put the effort on the user to manage their baseline environment. 或者,您可以选择简单地运送一个MSI,以检测和阻止这些丢失的信息,并由用户来管理他们的基准环境。 The actual MSI will then likely have features for web, service and sql. 这样,实际的MSI可能会具有针对Web,服务和sql的功能。 The web feature will install a bunch of files and configure the IIS meta. Web功能将安装一堆文件并配置IIS元数据。 The windows service will install some files and create a windows service. Windows服务将安装一些文件并创建Windows服务。 The SQL feature will ask for connection string information, execute some sql scripts and possibly configure the web and service layers' connection strings. SQL功能将询问连接字符串信息,执行一些sql脚本,并可能配置Web和服务层的连接字符串。

Some of this can be deferred until after the installation and placed into a custom configuration utility to simplify the installer work. 其中一些可以推迟到安装之后再放到自定义配置实用程序中,以简化安装程序的工作。

There are various design decisions that can be made so it can't be answered in more detail in a simple question format. 可以做出各种设计决策,因此无法以简单的问题格式更详细地回答。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM