Install Terraform on Centos 7

Firstly, download the latest Terraform from, then upload the zip package to your Centos 7.

  1. Make a new folder for Terraform and unzip the Terraform package
    [dzhang@localhost ~]$ cd terraform/
    [dzhang@localhost terraform]$ unzip ~/
    Archive: /home/dzhang/
    inflating: terraform[dzhang@localhost terraform]$ ls -al
    total 91324
    drwxrwxr-x. 2 dzhang dzhang 22 Feb 11 21:37 .
    drwx——. 20 dzhang dzhang 4096 Feb 11 21:36 ..
    -rwxrwxr-x. 1 dzhang dzhang 93508352 Feb 8 04:27 terraform
  2. Change the environment variable:
    [dzhang@localhost terraform]$ export PATH=/home/dzhang/terraform:$PATH
  3. Verify the installation
    [dzhang@localhost terraform]$ terraform –version
    Terraform v0.8.6

[dzhang@localhost terraform]$ terraform –help?
Usage: terraform [–version] [–help] [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
destroy Destroy Terraform-managed infrastructure
fmt Rewrites config files to canonical format
get Download and install modules for the configuration
graph Create a visual graph of Terraform resources
import Import existing infrastructure into Terraform
init Initializes Terraform configuration from a module
output Read an output from a state file
plan Generate and show an execution plan
push Upload this Terraform module to Atlas to run
refresh Update local state file against real resources
remote Configure remote state storage
show Inspect Terraform state or plan
taint Manually mark a resource for recreation
untaint Manually unmark a resource as tainted
validate Validates the Terraform files
version Prints the Terraform version

All other commands:
debug Debug output management (experimental)
state Advanced state management

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s