【问题标题】:How to install iis service by using aws cloudformaion template如何使用 aws cloudformation 模板安装 iis 服务
【发布时间】:2019-05-19 04:31:08
【问题描述】:

基本上我想通过使用 aws cloudformation 模板安装 iis 服务及其期货和角色,有人可以帮忙吗?

【问题讨论】:

    标签: amazon-web-services iis amazon-cloudformation


    【解决方案1】:

    您可以在用户数据字段中提供 PowerShell 脚本。该脚本将在第一次实例启动时自动运行。

    应该是这样的:

    "UserData" : {
        "Fn::Base64" : {
            "Fn::Join" : [
                "",
                [
                    "<powershell>\n",
                    "# Install IIS and Web Management Tools.\n",
                    "Import-Module ServerManager\n",
                    "install-windowsfeatures web-server, web-webserver\n",
                    "install-windowsfeature web-mgmt-tools\n",
                    "</powershell>\n"
                ]
            ]
        }
    }
    

    我只是从我的模板中复制了这个,所以请自己测试!此示例为 JSON 格式,但您也可以使用 YAML。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-03-24
      • 1970-01-01
      • 2020-03-13
      • 2019-02-15
      • 1970-01-01
      • 2018-07-21
      • 2014-03-22
      • 1970-01-01
      相关资源
      最近更新 更多