Install Terraform on Linux Centos

In this blog post, I will show you how to install Terraform on a Linux CentOS operating system.

About Terraform

Terraform is an open source multi cloud Infrastructure as a Code (IaC) tool.

Using Terraform we can deploy, modify and delete workloads in Azure, AWS and GCP.

The key benefit of Terraform is automation and reusability of code to provision and de-provision resources.

Check Path

Before installing Terraform we need to check which paths are configured on our server.

To check which path are registered, run the command below.

Note down one the path that you are going to install Terraform.

Placing Terraform in a directory or location that is not in the PATH will result in Terraform not working.

echo $PATH

Download Latest Version

To download the latest version of Terraform, head over to the link below.

https://www.terraform.io/downloads.html

Right click on the Linux link and click on Copy the link address.

Linux 
32-bit | 64 
Open link in new tab 
Open link in new window 
Open link in incognito window 
OpenB 
CO Send link to your devices 
32-bit | 64 
Solaris 
Save link as„. 
Copy link address 
Inspect 
Ctrl+Shift+I

Paste the link to the wget command as shown below,

wget https://releases.hashicorp.com/terraform/0.12.26/terraform_0.12.26_linux_amd64.zip

Unzip

Now, unzip the file to a location in your PATH as shown below.

In my case, /usr/bin is in my path and I will use it.

unzip ./terraform_0.12.26_linux_amd64.zip -d /usr/bin/

Check Version

At this stage, Terraform should be installed and working on your machine.

To check version, run the line  below.

terrafrom -v
[vadmin@centos terraform —v 
Terraform VO .12.26 
[vadmin@centos Cl

Processing…
Success! You're on the list.

Posted

in

by