- 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
The code of this script is also available here: https://github.com/PacktPublishing/Learning_DevOps/blob/master/CHAP04/install_packer.sh.
This script performs the following actions:
- Download the Packer version 1.4.0 package and check the checksum.
- 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:

推薦閱讀
- 腫瘤營(yíng)養(yǎng)診療規(guī)程
- 癲癇患者經(jīng)濟(jì)負(fù)擔(dān)藍(lán)皮書(shū)
- 食品毒理學(xué)
- Hands-On RESTful Web Services with TypeScript 3
- 腫瘤精準(zhǔn)放射治療靶區(qū)勾畫(huà)叢書(shū):泌尿系統(tǒng)腫瘤
- 營(yíng)養(yǎng)與疾病預(yù)防:醫(yī)護(hù)人員讀本
- 現(xiàn)代口腔正畸技術(shù)與臨床思維(現(xiàn)代實(shí)用口腔醫(yī)學(xué)著譯叢書(shū))
- 急診分診指導(dǎo)手冊(cè)
- 活血化瘀方藥臨床使用指南
- 臨床麻醉難點(diǎn)解析(第2版)
- 慢性意識(shí)障礙
- 腫瘤揭秘
- 故作正常
- 常見(jiàn)老年病家庭康復(fù)操作指南
- 中醫(yī)消化病舌診與用藥