This site requires JavaScript to be enabled

Notifications

Vagrant for Khoury Courses

25 views

Download and install VirtualBox

Head to the VirtualBox Downloads page and get the appropriate installer for your platform. Install the package using standard procedures for your operations system. Once VirtualBox is installed, continue to the next section to download and install Vagrant on your system. 

Download and install Vagrant

Installing Vagrant is extremely easy. Head over to the Vagrant downloads page and get the appropriate installer or package for your platform. Install the package using standard procedures for your operating system.

The installer will automatically add vagrant to your system path so that it is available in terminals. If it is not found, please try logging out and logging back in to your system (this is particularly necessary sometimes for Windows).

Vagrant Documentation

Verifying the Installation

After installing Vagrant, verify the installation worked by opening a new command prompt or console, and checking that vagrant is available:

$ vagrant
Usage: vagrant [options] <command> [<args>]
 
    -v, --version                    Print the version and exit.
    -h, --help                       Print this help.
 
# ...

Initialize the Khoury Vagrant Box

When you have verified that Vagrant is installed properly, open a new command prompt or console, and initialize the Khoury Vagrant Box. 

$ vagrant box add khoury/CentOS-7.6
$ vagrant init khoury/CentOS-7.6       # This will create vagrantfile in your working directory
$ vagrant up
$ vagrant ssh-config                   # This will show vagrant Image IP Address, port details 
$ vagrant ssh                          # This will ssh directly into the vagrant box
 

After running the above two commands, you will have a fully running virtual machine in VirtualBox running CentoOS 7.4 with all of the packages running on Khoury managed Linux machines. You can SSH into this machine with vagrant ssh, and when you are done playing around, you can terminate the virtual machine with vagrant destroy.

Installing Packages

To become root and install packages, use the root password of vagrant when prompted. 

[vagrant@localhost ~]$ su
Password: vagrant
[root@localhost vagrant]# yum install <package name>
[root@localhost vagrant]# exit                                ### To exit root