You can support us by downloading this article as PDF from the Link below. Download the guide as PDF

How can I install Vagrant on CentOS 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 Technology of choice

Choose a virtualization technology that you’ll orchestrate 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 the installation of Virtualization tool on CentOS / RHEL 8 system, you can now install Vagrant on CentOS 8 / RHEL 8 machine. If you’re using it with other providers such as VMware or Docker, ensure it is installed prior to Vagrant installation.

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

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

A successful installation output looks similar to this:

Last metadata expiration check: 0:00:45 ago on Tue 31 Dec 2019 04:57:30 PM UTC.
vagrant_2.2.7_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 installation of Vagrant by checking the version installed and the help page.

$ vagrant --version
Vagrant 2.2.6

$ vagrant --help

Step 3: Using Vagrant on CentOS 8 / RHEL 8

Check our guide below:

How To run CentOS 8 VM using Vagrant on KVM / VirtualBox / VMWare / Parallels

It covers creation of a CentOS 8 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

You can support us by downloading this article as PDF from the Link below. Download the guide as PDF