Create and configure lightweight, reproducible, and portable development environments. Vagrantis an amazing tool for managing virtual machines via a simple to use command line interface.
In order to simplify the installation process you should install homebrew-cask which provides a friendly homebrew-style CLI workflow for the administration of Mac applications distributed as binaries. Refer to this article in order to install homebrew-cask.
Firstly install virtualbox:
brew cask install virtualbox
Now install Vagrant using homebrew:
brew cask install vagrant
Vagrant-Manager helps you manage all your virtual machines in one place directly from the menubar.
brew cask install vagrant-manager
Add the Vagrant box you want to use. We'll use Ubuntu 12.04 for the following example.
$ vagrant box add precise64 <http://files.vagrantup.com/precise64.box>
You can find more boxes at Vagrant Cloud
Now create a test directory and cd into the test directory. Then we'll initialize the vagrant machine.
$ vagrant init precise64
Now lets start the machine using the following command.
$ vagrant up