doulou1989 2015-08-10 02:01
浏览 48
已采纳

是否有更有效的方法在IIS上安装Web应用程序而不是手动安装?

I have a PHP web app that i would like to be able to ship as easily as possible. Some of the things it does are as follows:

  • Call shell_exec() to execute windows executables
  • Call move_uploaded_file() to move a file to a network folder
  • Create temporary files for processing at later stages

Now these all require special things to be checked during manual installs such as the App Pool's user permissions on accessing network folders, creating files ect. A process that can be long and arduous. Normally this is the process i go through:

  1. Check to see if PHP is installed on client's server. If not, download and install it first
  2. Download zip archive from my website
  3. Check if the server has already got the app installed. If so, copy and paste code files and finish.
  4. If fresh install, extract zip into a physical path that will map to the web application in IIS
  5. Open IIS, create web application under new or existing website
  6. Ensure there is a database connection for the PHP application to talk to
  7. Configure my app's settings (these are defined in my app)
  8. Ensure the App Pool user that my app will be running as has permissions to do the things i mentioned above
  9. Finally, test the app

So given that there is a long list of steps needed to install my app. My question is, is there a more efficient way to go about this? given that there are so many things to do. Can we create an MSI installer application or something similar?

  • 写回答

1条回答 默认 最新

  • douguanyun2169 2015-08-11 11:44
    关注

    Yes, all these steps can be automated. I would use a PowerShell script to perform all those actions.

    Writing a Windows program as a MSI is another option, the tool depends on the available skill-sets in your environment.

    To do this is not done in a few hours, you may need to learn about how to do the various things and then there will be a lot of testings. Different Windows versions are configurations have to be supported.

    I went through such a process and it took much longer than planned, so you have to think about who much such a script would be worth for you.

    If you only do a handful of installations every year it may not be worth investing the time creating the script.

    You may be able to use PowerShell DSC but you still have to learn, write configuration and test things.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥15 latex怎么处理论文引理引用参考文献