How To Install Terraform on CentOS 9 / Rocky Linux 9 / Alma Linux 9

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

In this guide, we will show you how to install Terraform in CentOS, Alma Linux and Rocky Linux.

HashiCorp Terraform is an infrastructure as code tool that lets you define both cloud and on-prem resources in human-readable configuration files that you can version, reuse, and share. You can then use a consistent workflow to provision and manage all of your infrastructure throughout its lifecycle. Terraform can manage low-level components like compute, storage, and networking resources, as well as high-level components like DNS entries and SaaS features.

Install Terraform on CentOS 9 / Rocky Linux 9 / Alma Linux 9

Follow the steps below to get started with Terraform :

  • Update your system packages with running the below command:
sudo dnf update -y && sudo dnf upgrade -y
  • Install the required yum packages such as yum-utils by running the following command:
sudo dnf install -y yum-utils
  • Terraform package is not available on the base repository. So You can install it via importing HashiCorp repo as follows:
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/$release/hashicorp.repo
  • Run the command below to reflect on changes
sudo dnf update -y
  • Then install Terraform as shown below:
sudo dnf install terraform -y
  • Once installed, verify the installation with checking the version of Terraform as below:
terraform --version
  • List all Terraform sub-commands:
terraform -help
terraform centos

How to Remove (Uninstall) Terraform

  • Remove Terraform 
sudo dnf remove terraform

Install Terraform -Conclusion

That’s it

Thanks.

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
MQ-Jr
MQ-Jr
unixcop Admin

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook