• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Vagrant Installation

Vagrant is an open source tool for building a complete virtual development environment. A test environment is required for testing the latest release and new tools. It works on Linux, Mac OS X, or Windows and although by default it uses VirtualBox for managing the virtualization, it can be used with other providers such as VMware or AWS.

How to install Vagrant

First you need to download and run the installation kit.

Check that you have dpkg and Virtual box installed:

$ sudo apt-get install virtualbox

Installing Vagrant:

$ sudo apt-get install vagrant

Install the dkms package to ensure that the VirtualBox host kernel modules (vboxdrv, vboxnetflt and vboxnetadp) are properly updated if the Linux kernel version changes during the next apt-get upgrade.

$ sudo apt-get install virtualbox-dkms

Vagrant can quickly deploy the development environment. Get the vagrant images from here.

The following command will install precise32 box from the vagrant website.

$ vagrant box add precise32 http://files.vagrantup.com/precise32.box

-Then create a vagrant file in this folder by calling ‘vagrant init’, which will be the central file for the project configuration.

$ mkdir vagrant_project $ cd vagrant_project $ vagrant init

Edit the Vagrantfile in this directory and replace

config.vm.box = “precise32”

This will tell it to use this new box. Save the file and exit. Now you can deploy the guest machine with the following command:

vagrant up

This will bring up a VPS running Ubuntu 12.04 LTS. To make use of it, you can easily SSH into it:

vagrant ssh

After you are done working with the guest machine, you can exit and go back to the host with the following command:

exit

If you want to stop and remove the guest machine and all traces of it, run the following command from the host machine:

vagrant destroy

The files that were synchronized with the host machine will not be removed from the host. Additionally, you can redeploy the guest machine again for this configuration using the same vagrant up command.

Summary
Review Date
Reviewed Item
How to install Vagrant by Vagrant Experts
Author Rating
5

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Vagrant Installation"

    Leave a Message

    Your email address will not be published. Required fields are marked *

    Site Disclaimer, Copyright © 2016 - All Rights Reserved.

    Support


    Please leave a message and we'll get back to you soon.

    I agree to be contacted via e-mail.