View a markdown version of this page

安装适用于 Windows 的防护 - AWS CloudFormation Guard

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

安装适用于 Windows 的防护

你可以通过 Cargo 或 Ch AWS CloudFormation Guard ocolatey 在 Windows 上安装。

先决条件

要通过命令行界面构建 Guard,必须安装适用于 Visual Studio 2019 的构建工具。

  1. 从 Visual Studio 2019 版构建工具网站上下载微软 Visual C++ 构建工具。

  2. 运行安装程序,然后选择默认值。

安装货物防护

Cargo 是 Rust 包管理器。完成以下步骤来安装 Rust,其中包括 Cargo。然后,安装 Guard from Cargo。

  1. 下载 Rust 然后运行 rustup-init.exe。

  2. 在命令提示符下,选择 1,这是默认选项。

    该命令将返回以下输出。

    Rust is installed now. Great!
        
        To get started you may need to restart your current shell.
        This would reload its PATH environment variable to include
        Cargo's bin directory (%USERPROFILE%\.cargo\bin).
        
        Press the Enter key to continue.
  3. 要完成安装,请按 E nter 键。

  4. 安装了 Cargo 后,运行以下命令来安装 Guard。

    cargo install cfn-guard

    结果:你已经成功安装了 Guard。

    1. (可选)要确认 Guard 的安装,请运行以下命令。

      cfn-guard --version

      该命令将返回以下输出。

      cfn-guard 3.1.2

安装来自 Chocolatey 的守卫

Chocolatey 是一款适用于 Windows 的软件包管理器。完成以下步骤安装 Chocolatey。然后,安装来自 Chocolatey 的 Guard。

  1. 按照本指南安装 Chocolat ey

  2. 安装了 Chocolatey 后,运行以下命令来安装 Guard。

    choco install cloudformation-guard

    结果:你已经成功安装了 Guard。

    1. (可选)要确认 Guard 的安装,请运行以下命令。

      cfn-guard --version

      该命令将返回以下输出。

      cfn-guard 3.1.2