How can I install Vagrant on Rocky 8 / RHEL 8 Linux system?. Vagrant is a command line tool that enables you to create and configure portable and reproducible development environments and demo labs. The product is developed by HashiCorp.
With Vagrant, you can setup your development environments in seconds on various virtualization platforms / providers such as KVM, VirtualBox, VMware, Parallels, Hyper-V, and Docker. There is comprehensive documentation which you can follow along to get started.
Step 1: Install Virtualization hypervisor
Choose a virtualization technology that you’ll orchestrate with Vagrant. For developers, the most common open source alternatives are KVM and VirtualBox:
Step 2: Install Vagrant
After the installation of Virtualization tool on Rocky / RHEL 8 system, you can now install Vagrant. If you’re using it with other providers such as VMware or Docker, ensure it is installed prior to Vagrant installation.
You Check the latest version of Vagrant available in the Downloads page. But we will install Vagrant on from YUM repository.
Install packer build dependencies:
sudo dnf groupinstall "Development Tools" -y
sudo dnf -y install rsync gcc zlib-devel libvirt-devel cmake
Install Ruby and Ruby Development packages that are required to use Vagrant.
sudo dnf install -y ruby ruby-devel
Add Vagrant YUM repository:
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
Then install Vagrant:
sudo yum install vagrant
Start installation using y when asked:
...
Transaction Summary
==================================================================================================================================================================
Install 1 Package
Total download size: 39 M
Installed size: 112 M
Is this ok [y/N]: y
Agree to import GPG key:
...
------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 14 MB/s | 39 MB 00:02
Hashicorp Stable - x86_64 96 kB/s | 3.1 kB 00:00
Importing GPG key 0xA3219F7B:
Userid : "HashiCorp Security (HashiCorp Package Signing) <[email protected]>"
Fingerprint: E8A0 32E0 94D8 EB4E A189 D270 DA41 8C88 A321 9F7B
From : https://rpm.releases.hashicorp.com/gpg
Is this ok [y/N]: y
Confirm installation of Vagrant by checking the version installed and the help page.
vagrant --version
View Vagrant usage help page:
vagrant --help
Step 3: Using Vagrant
Check our guide below:
It covers creation of a virtual machine on KVM, VirtualBox and other environments using vagrant.
More guides:
- Install and Configure DHCP Server & Client on CentOS 8 / RHEL 8
- How To Provision VMs on oVirt / RHEV with Terraform
- How to Provision VMs on KVM with Terraform