Arch Linux
Installing terraform
on Arch Linux variants is pretty straightforward. Its available here and supported in their standard repository.
1 | $ sudo pacman -Sy terraform |
You can test that worked with:
1 2 | [andy@home-pc ~]$ terraform - v Terraform v0.11.13 |
CentOS 7
Unfortunately the situation is not quite as straightforward for Ubuntu or CentOS installations. If you’re a Private Terraform Enterprise customer, you may want to check this guide out. For the rest of us, we need to manually download and install.
First install a couple of useful packages:
1 | $ sudo yum install jq wget unzip -y |
With these two packages installed, you can download the latest package with:
1 | $ wget $( echo "https://releases.hashicorp.com/terraform/$(curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r -M '.current_version')/terraform_$(curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r -M '.current_version')_linux_amd64.zip" ) |
Unzip the package and move it to your local bin
directory.
1 2 | $ unzip terraform_0.11.13_linux_amd64.zip $ sudo mv - v terraform /usr/local/bin/ |
Test that worked with:
1 2 | [andy@terra ~]$ terraform -version Terraform v0.11.13 |
Ubuntu
Installing Terraform on Ubuntu is actually the same process as that of CentOS; it must be manually installed. First install some required packages like unzip
and jq
.
1 | andy@ubuntu16:~$ sudo apt install unzip -y |
Download the latest package with:
1 | andy@ubuntu16:~$ wget $( echo "https://releases.hashicorp.com/terraform/$(curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r -M '.current_version')/terraform_$(curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r -M '.current_version')_linux_amd64.zip" ) |
Then unzip and move the binary to /usr/local/bin
.
1 2 | andy@ubuntu16:~$ unzip terraform_0.11.14_linux_amd64.zip andy@ubuntu16:~$ sudo mv - v terraform /usr/local/bin/ |
Again, test that worked with:
1 2 | andy@ubuntu16:~$ terraform - v Terraform v0.11.14 |
Be the first to comment