- 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:

推薦閱讀
- 癲癇的診斷與治療:臨床實(shí)踐與思考
- 中國(guó)神經(jīng)介入發(fā)展史
- 突面畸形的正畸策略及技術(shù)
- 腫瘤內(nèi)科醫(yī)師查房手冊(cè)(第2版)
- 實(shí)用化學(xué)藥品檢驗(yàn)檢測(cè)技術(shù)指南
- 意識(shí)障礙康復(fù)評(píng)定與治療學(xué)
- 朱德生皮膚病學(xué)(第5版)
- 全瓷修復(fù)技術(shù)(第2版)
- 腫瘤康復(fù)指南
- 中國(guó)腫瘤心理臨床實(shí)踐指南(2024)
- 悅讀中醫(yī):首屆全國(guó)悅讀中醫(yī)校園之星作品集(第二輯)
- 化妝品生產(chǎn)質(zhì)量管理規(guī)范240問(wèn)
- 深呼吸:菠蘿解密肺癌
- 老年疾病預(yù)防與康復(fù)保健
- 眼科疾病防治手冊(cè)