Firstly, download the latest Terraform from https://www.terraform.io/downloads.html, then upload the zip package to your Centos 7.
- Make a new folder for Terraform and unzip the Terraform package
[dzhang@localhost ~]$ cd terraform/
[dzhang@localhost terraform]$ unzip ~/terraform_0.8.6_linux_amd64.zip
Archive: /home/dzhang/terraform_0.8.6_linux_amd64.zip
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 - Change the environment variable:
[dzhang@localhost terraform]$ export PATH=/home/dzhang/terraform:$PATH - 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