官术网_书友最值得收藏!

Installing Packer by script on Linux

The installation script for a Linux machine is as follows:

PACKER_VERSION="1.4.3" #Update with your desired version

curl -Os https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip \
&& curl -Os https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_SHA256SUMS \
&& curl https://keybase.io/hashicorp/pgp_keys.asc | gpg --import \
&& curl -Os https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_SHA256SUMS.sig \
&& gpg --verify packer_${PACKER_VERSION}_SHA256SUMS.sig packer_${PACKER_VERSION}_SHA256SUMS \
&& shasum -a 256 -c packer_${PACKER_VERSION}_SHA256SUMS 2>&1 | grep "${PACKER_VERSION}_linux_amd64.zip:\sOK" \
&& unzip -o packer_${PACKER_VERSION}_linux_amd64.zip -d /usr/local/bin

This script performs the following actions:

  1. Download the Packer version 1.4.0 package and check the checksum.
  2. Unzip and copy the package into a local directory, /usr/local/bin (by default, this folder is in the PATH environment variable).

The following is a screenshot of the execution of the script for installing Packer on Linux:

主站蜘蛛池模板: 红原县| 大悟县| 贡嘎县| 南召县| 台北县| 民县| 远安县| 建始县| 宝丰县| 岑溪市| 九龙坡区| 勐海县| 咸宁市| 邛崃市| 玛多县| 深水埗区| 皋兰县| 岐山县| 玛多县| 连州市| 赤壁市| 天台县| 镇赉县| 东山县| 宁安市| 蓬莱市| 海林市| 纳雍县| 信宜市| 永春县| 周至县| 汶上县| 苗栗市| 舟山市| 玛多县| 房产| 三门峡市| 霞浦县| 织金县| 赤峰市| 瓦房店市|