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

  • Learning DevOps
  • Mikael Krief
  • 131字
  • 2021-06-24 12:32:15

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:

主站蜘蛛池模板: 景洪市| 壶关县| 兴隆县| 普格县| 盐源县| 九江市| 浦江县| 扎鲁特旗| 新和县| 曲靖市| 景德镇市| 交城县| 西乡县| 高唐县| 泽州县| 抚州市| 巴马| 万源市| 土默特左旗| 石河子市| 改则县| 苏州市| 江达县| 隆化县| 华容县| 盈江县| 扎鲁特旗| 永春县| 教育| 景德镇市| 根河市| 五莲县| 玛纳斯县| 肃宁县| 磐安县| 隆昌县| 凭祥市| 玉林市| 自治县| 綦江县| 栾川县|