GNU/Linux >> Linux Esercitazione >  >> Cent OS

Come installare Terraform su CentOS 8

In questo tutorial, ti mostreremo come installare Terraform su CentOS 8. Per quelli di voi che non lo sapessero, Terraform è uno strumento di automazione dell'infrastruttura gratuito e open source di Hashicorp che viene utilizzato per creare, creare e modificare utilizzando l'infrastruttura come codice tra vari provider di cloud come AWS, cloud di Azure, GCP, cloud di Oracle e molti altri.

Questo articolo presuppone che tu abbia almeno una conoscenza di base di Linux, sappia come usare la shell e, soprattutto, che ospiti il ​​tuo sito sul tuo VPS. L'installazione è abbastanza semplice e presuppone che tu sono in esecuzione nell'account root, in caso contrario potrebbe essere necessario aggiungere 'sudo ' ai comandi per ottenere i privilegi di root. Ti mostrerò l'installazione passo passo di Terraform su CentOS 8.

Prerequisiti

  • Un server che esegue uno dei seguenti sistemi operativi:CentOS 8.
  • Si consiglia di utilizzare una nuova installazione del sistema operativo per prevenire potenziali problemi
  • Un non-root sudo user o accedere all'root user . Ti consigliamo di agire come non-root sudo user , tuttavia, poiché puoi danneggiare il tuo sistema se non stai attento quando agisci come root.

Installa Terraform su CentOS 8

Passaggio 1. Prima di tutto, assicurati che tutti i pacchetti siano aggiornati.

sudo dnf update

Passaggio 2. Installazione di Terraform su CentOS 8.

Esegui il seguente comando per scaricare l'ultima configurazione di terraform dal sito ufficiale di Terraform:

wget https://releases.hashicorp.com/terraform/1.0.0/terraform_1.0.0_linux_amd64.zip
sudo unzip terraform_1.0.0_linux_amd64.zip

Avanti, sposta la configurazione estratta in /usr/local/bin directory:

sudo mv terraform /usr/local/bin/

Ora l'installazione può essere verificata eseguendo un semplice comando di versione terraform:

terraform -v

Una volta installato correttamente, controlliamo per terraform i comandi:

terraform

Risultato:

terraform
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
    env                Workspace management
    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               Initialize a Terraform working directory
    login              Obtain and save credentials for a remote host
    logout             Remove locally-stored credentials for a remote host
    output             Read an output from a state file
    plan               Generate and show an execution plan
    providers          Prints a tree of the providers used in the configuration
    refresh            Update local state file against real resources
    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
    workspace          Workspace management


All other commands:
    0.12upgrade        Rewrites pre-0.12 module source code for v0.12
    debug              Debug output management (experimental)
    force-unlock       Manually unlock the terraform state
    push               Obsolete command for Terraform Enterprise legacy (v1)
    state              Advanced state management

Congratulazioni! Hai installato correttamente Terraform. Grazie per aver utilizzato questo tutorial per l'installazione di Terraform sul sistema CentOS 8. Per ulteriore aiuto o informazioni utili, ti consigliamo di controllare il sito Web ufficiale di Terraform.


Cent OS
  1. Come installare PHP 7, 7.2 e 7.3 su CentOS 7

  2. Come installare Java 11 e 12 su CentOS 7

  3. Come installare Wine 4.0 su CentOS 7

  4. Come installare Vim 8.2 su CentOS 7

  5. Come installare VirtualBox su CentOS 7

Come installare Ruby su CentOS 7

Come installare PostgreSQL su CentOS 7

Come installare R su CentOS 7

Come installare R su CentOS 8

Come installare e utilizzare Terraform su CentOS 8

Come installare Terraform v1.0.0 in CentOS 8 / Ubuntu 21.04