Before going into details on how to utilize Vagrant, you need to have it on your host system.
Download and install VirtualBox. Choose the version
according to the operating system on the host.
For example, if you want to build or run Vagrant machines under Mac OS X, choose
VirtualBox x.y.z for OS X hosts, where x.y.z
is the version number
of VirtualBox. Double click the downloaded .dmg
file to install
Vagrant. Those who work on a Windows machines will select VirtualBox
x.y.z for Windows hosts, which downloads an .exe
file which can just
be double clicked to perform the installation.
Installing VirtualBox on Ubuntu and other Linux systems can be challenging. Here is a recipe. Start with
Terminal> sudo apt-cache search virtualbox
to find a package virtualbox-X
, where X
denotes a particular
version number (e.g., 4.2
). Then copy and paste the following
commands into the terminal window:
Terminal> wget -q \
http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc \
-O- | sudo apt-key add -
Terminal> sudo sh -c 'echo \
"deb http://download.virtualbox.org/virtualbox/debian precise contrib" \
>> /etc/apt/sources.list'
Terminal> sudo apt-get update
Terminal> sudo apt-get install virtualbox-X
(Recall to replace X
by the appropriate version number.)
You may need to run sudo apt-get -f install
and upgrade packages.
It is easier to work with VirtualBox
on Mac or Windows if you run into trouble with Ubuntu.
We recommend to install VirtualBox as shown above on Ubuntu rather than
downloading a particular .deb
file (Debian package) from
the VirtualBox site, because
the apt-get install
approach above makes it easier to explicitly get all the
packages that VirtualBox depends on.
Download and install Vagrant.
Choose the latest version and the installation file corresponding to
the host's operating system (where you installed VirtualBox). On a Mac, you
select the Vagrant-x.y.z.dmg
file (x.y.z
denotes the version of
the software), on Windows the Vagrant_x.y.z.msi
file is the
relevant choice.
On Ubuntu, select vagrant_x.y.z_*.deb
and install it
by sudo dpkg -i vagrant_x.y.z_*.deb
.
On Windows and Mac OS X, the vagrant
command is automatically
available after installation (because the directory where the
vagrant
executable resides is placed in your PATH
environment
variable).
This is true for many Linux systems too, otherwise you must
add the relevant directory where the vagrant
program was installed
(say /opt/vagrant/bin
) to your PATH
variable.
Windows computers do not feature an ssh client and an X server by default, which are needed in scientific applications. Therefore, we recommend to install Cygwin or the enhanced tool Babun, which is a pre-configured version of Cygwin. Babun and Cygwin give easy access to an ssh-client and an X-server on Windows computers. Actually, Babun or Cygwin extends Windows with a complete Unix environment. The home pages of both projects have detailed installation instructions.
Only the minimal base packages from the Cygwin distribution are installed by default. This means that you need to manually select the 'X11' category during installation to install Cygwin's X11 server. Notice that downloading Cygwin might take one or more hours, depending on the speed of your network.
Once installed, we need to add Cygwin's ssh client to our
PATH
. Cygwin is by default installed to C:\cygwin
, so the command
is set PATH=%PATH%;C:\cygwin\bin
.