Install terraform on CentOS 7.5

Install terraform on CentOS 7.5

Terraform is an infrastructure as code software by HashiCorp.

It is a tool for building, changing, and versioning infrastructure in efficient way.

Terraform supports many providers from Azure, AWS, Google to OpenStack, Docker and many more.

1 Download Terraform

Go to terraform download page and copy link address for Linux 64-bit:

Then in CentOS download terraform package:

$ curl

Unpack the package:

$ unzip

2 Install Terraform

Copy terraform whatever you want. For example it could be in $HOME/apps, where $HOME is your home directory /home/username

Set the PATH to point to terraform application.

Edit .bash_profile file and add terraform folder in the PATH: $HOME/apps

# User specific environment and startup programs
export PATH

Now execute the content of the .bash_profile file:

$ source .bash_profile

Remove the zip file:

$ rm -fR

3 Verifying the installation

Check version installed:

$ terraform -v
Terraform v0.11.8

Run command:

$ terraform

Usage: terraform [-version] [-help] <command> [args]

The available commands for execution are listed below.
The most common, useful commands are shown first, followed by
less common or more advanced commands. If you’re just getting
started with Terraform, stick with the common commands. For the
other commands, please read the help and docs before usage.

Common commands:
apply Builds or changes infrastructure
console Interactive console for Terraform interpolations

Leave a Reply