To install Terraform from the yum config linux repository, simply type sudo yum install -y yum-utils && sudo yum -y install terraform
commands AWS ssh terminal window and press enter to install it on Amazon Linux 2 EC2 instance server.
How to Install Terraform on Amazon AWS Linux 2 EC2
Steps for installing and verifying Terraform Amazon AWS Linux 2 EC2 instance server:
Step 1 – Login to Amazon AWS Linux 2 Console
Log into the AWS EC2 Management Console.
Step 2 – Connect to the AWS Linux 2 Instance via SSH
To connect your Amazon AWS linux 2 server from the SSH terminal, Open your putty or ssh and connect to from server.
If you are new to connect aws ec2 instance with Windows, ubuntu, and mac systems. A step-by-step guide on How to Connect to ec2 Instance From Putty and SSH Terminal.
Step 3 – Installing yum-config-manager and Adding it to official HashiCorp Linux Repo
Run abc command on aws ssh terminal window to Install yum-config-manager to manage your repositories and run abc to add the official HashiCorp Linux repository:
sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo
Step 4 – Updating the Package List
Run sudo yum update
command on aws ssh terminal window to update system package list:
sudo yum update
Step 5 – Installing Terraform on Amazon Linux 2
To run the sudo yum -y install terraform
command on aws ssh terminal window to install Terraform in amazon aws linux 2 server:
sudo yum -y install terraform
Step 6 – Verify Installation
To run the terraform --version
command on aws ssh terminal window to verify terraform
installation in amazon aws linux 2 server:
terraform --version
This will print terraform
version on aws ssh terminal window.
Conclusion
Through this tutorial, you have learned how to install terraform on the amazon Linux 2 ec2 server.