How to install Vagrant on CentOS 8 / RHEL 8

How to install Vagrant on CentOS 8 / RHEL 8 Linux system? Vagrant is a command line tool that lets you create and configure a portable and reproducible development environment and demonstration lab. This product was developed by HashiCorp.

With Vagrant, you can set up a development environment on various virtualization platforms / providers (such as KVM, VirtualBox, VMware, Parallels, Hyper-V, and Docker) in seconds. There is comprehensive documentation that you can follow to get started.

Step 1: Install your preferred virtualization technology

Select the virtualization technology you will coordinate with Vagrant. For developers, the most common open source alternatives are KVM and VirtualBox:

Install VirtualBox on CentOS / RHEL 8

Install KVM on CentOS / RHEL 8

Step 2: Install Vagrant on CentOS 8 / RHEL 8

After installing the virtualization tools on CentOS / RHEL 8 systems, you can now install Vagrant on CentOS 8 / RHEL 8 computers. If you use it with other providers such as VMware or Docker, make sure to install it before installing Vagrant.

Check the latest version of Vagrant available on the Downloads page.

VERSION="2.2.6"
sudo dnf -y install https://releases.hashicorp.com/vagrant/${VERSION}/vagrant_${VERSION}_x86_64.rpm

A successful installation output is similar to the following:

Last metadata expiration check: 0:00:45 ago on Tue 31 Dec 2019 04:57:30 PM UTC.
vagrant_2.2.6_x86_64.rpm                                                                                                1.0 MB/s |  40 MB     00:38    
Dependencies resolved.
========================================================================================================================================================
 Package                           Arch                             Version                                Repository                              Size
========================================================================================================================================================
Installing:
 vagrant                           x86_64                           1:2.2.6-1                              @commandline                            40 M

Transaction Summary
========================================================================================================================================================
Install  1 Package

Total size: 40 M
Installed size: 114 M
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                1/1 
  Installing       : vagrant-1:2.2.6-1.x86_64                                                                                                       1/1 
  Verifying        : vagrant-1:2.2.6-1.x86_64                                                                                                       1/1 

Installed:
  vagrant-1:2.2.6-1.x86_64                                                                                                                              

Complete!

Confirm Vagrant installation by checking the installed version and the help page.

$ vagrant --version
Vagrant 2.2.6

$ vagrant --help

Step 3: Using Vagrant on CentOS 8 / RHEL 8

Check out the guide below:

How to run CentOS 8 VM with Vagrant on KVM / VirtualBox / VMWare / Parallels

It covers creating CentOS 8 virtual machines on KVM, VirtualBox and other environments using Tramp.

Install and configure DHCP server and client on CentOS 8 / RHEL 8

How to configure a VM on oVirt / RHEV using Terraform

How to configure a VM on KVM using Terraform

Sidebar