×


Steps to Install Terraform On Ubuntu

Need to install terraform on CentOS 7/Ubuntu 18.04? This guide will help you out.


Essentially, Terraform is a powerful tool for building, changing, and versioning infrastructure efficiently.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform Software Installation on their CentOS / Ubuntu Servers.

In this context, we shall look into how to install terraform on CentOS 7/Ubuntu 18.04.

More information about Terraform?

Terraform is referred to as an "Infrastructure as Code" tool for configuring files in relation of resources management.
Additionally, it supports cloud service providers like AWS, Google Cloud Platform, Azure, and so on.

How to install terraform on CentOS 7/Ubuntu 18.04?

Follow the steps below to get terraform installed on your server.

i. How to install Terraform on CentOS 7?

Start by logging into your Server with an SSh tool such as putty and once logged in, run the command below to update the Server packages;

sudo yum update


Ensure that your have wget and unzip tool. If not available, you can install them by running the following command;

sudo yum install wget unzip


Now you can download Terraform from the developer’s website by executing the following command;

sudo wget https://releases.hashicorp.com/terraform/0.12.2/terraform_0.12.2_linux_amd64.zip


Next, extract the downloaded file by running the command;

sudo unzip ./terraform_0.12.2_linux_amd64.zip –d /usr/local/bin


You will se an Output with Terraform's directory path.

To verify that Terraform is installed, execute the command below;

terraform –v


The output will display the version and in our case you will see;

Terraform v.0.12.2


ii. How to install Terraform on Ubuntu 18.04?

Begin by updating the repository packages lists. To do this, run the following command;

sudo apt-get update


In order to install wget and unzip, run the command;

sudo apt-get install wget unzip


Now with the wget utility, you can download Terraform by running the command;

sudo wget https://releases.hashicorp.com/terraform/0.12.2/terraform_0.12.2_linux_amd64.zip


After downloading, extract the zipped file by executing the command;

sudo unzip ./ terraform_0.12.2_linux_amd64.zip –d /usr/local/bin


Finally, verify that Terraform is working;

terraform –v


As a result, the output must display Terraform v.0.12.2.

[Need additional support to install Software on CentOS / Ubuntu System? – We are available to help you]


Conclusion

This guide will show you how to install terraform on CentOS 7/Ubuntu 18.04.