Wednesday, June 6, 2018

TerraForm Installation Steps on RedHat Enterprise Linux (RHEL) 7.5 - How to install Terraform on RedHat Enterprise Linux 7.5 ?

Please find steps for installing Terraform on RedHat Enterprise Linux (RHEL) 7.5. You can install this on any of your existing RedHat Enterprise Linux EC2 instance.
Terraform is used for provisioning resources and infrastructure on Cloud. You don't need to create manually any resource on cloud.

Please find steps for installing Terraform on Linux:

sudo yum update
sudo mkdir -p /opt/terraform
cd /opt/terraform/
sudo yum install wget

Download Terraform
sudo wget https://releases.hashicorp.com/terraform/0.11.7/terraform_0.11.7_linux_amd64.zip

Extract Terraform

sudo yum install unzip -y
sudo unzip terraform_0.11.7_linux_amd64.zip

Add Path to Profile
add Terraform installed path to PATH by modifying below file:

sudo vi /etc/profile

go to end of the file, add the below line:

export PATH=$PATH:/opt/terraform 

source /etc/profile
Verify Installation

now type  below command to see Terraform is installed or not:
terraform --version

Terraform v0.11.7

4 comments:

  1. aminep007@gmail.comJune 16, 2018 at 9:02 PM

    Adding path export PATH=$PATH:/opt/terraform didn't worked.
    Error_-bash: terraform: command not found

    ReplyDelete
  2. Amit - did you create the directory first ?
    sudo mkdir -p /opt/terraform

    also, make sure unzip extracted terraform from zip file

    ReplyDelete