Skip to content

Installing on an Ubuntu Host System

SoftCafe edited this page Nov 10, 2020 · 18 revisions

Log into your system as a user that has sudo privileges.

Install Prerequisites

The GMAT2020_boxx has five host prerequisites curl, bsdtar, a git client, Virtual Box and Vagrant.

curl and bsdtar

A few Ubuntu distributions don't have curl and/or bsdtar. To install these packages, enter:

sudo apt install -y curl bsdtar

The apt command won't do anything if the packages are already installed, so it is safe to issue the above command.

Git Client

See Git Client, above.

VirtualBox

Get the VirtualBox Installation Files

Open a browser window to the Virtual Box Download page. Select the VirtualBox Extension Pack to download the platform independent .extpack file. Then select the link to Linux distributions. Select your Ubuntu distribution to download the .deb file to your Downloads directory.

Install VirtualBox

Enter:

sudo apt install [full path to VirtualBox .deb file just downloaded]

Install VirtualBox Extensions

Installing the Virtual Box extension pack is a little more involved. To install it you must use the VBoxManage command line:

sudo vboxmanage extpack install [full path to Oracle Extension Pack just downloaded]

The first time you run the command, it will ask you to accept the Oracle license: Do you agree to these license terms and conditions (y/n)? If you agree, pres the lower case y key.

Then it will output lines similar to the ones below:

License accepted. For batch installation add --accept-license=xxx to the VBoxManage command line.

You might be able to skip the following, but for some installations, the following is required:

Rerun the vboxmanage command, above, adding the --accept-license text to the command:

sudo vboxmanage extpack install --accept-license=xxx Downloads/[Oracle Extension Pack just downloaded]

Verify VirtualBox Is Installed and Can Perform Commands

Vagrant does not use the Virtual Box GUI, but uses the VBoxManage command, instead.

Verify the installation by entering:

vboxmanage --version

The output of this command should match the version just installed from the web site.

Verify Virtual Box can run a virtual machine by entering:

    VBoxManage createvm --name temporary --ostype Ubuntu_64 --register  
    VBoxManage startvm temporary --type headless

Look for the message "VM temporary" has been successfully started."

Delete the temporary VM by issuing the following commands:

VBoxManage controlvm temporary poweroff  
VBoxManage unregistervm --delete temporary

Vagrant

Install Vagrant

Open a browser to the Vagrant download page.

Download the appropriate version of Vagrant for your Linux distribution.

If the Vagrant download was not a .zip file, use your distribution's tools to install the downloaded file.

If you used your OS's tools to install Vagrant skip to the Verify Vagrant Install section, below.

If you downloaded a .zip file, install the unzip command. Enter:

sudo apt -y install unzip

Assuming you download directory is ~/Downloads:

cd Downloads  
unzip [vagrant zip file just downloaded]

This will produce a vagrant executable file in your Download directory. You should move this to a directory on your path. Issue:

echo $PATH

Pick a directory on your path, such as /usr/local/bin and move the vagrant executable into it.

sudo chown root:root vagrant  
sudo mv vagrant [path directory]

Verify Vagrant Install

Verify vagrant is installed by entering

vagrant --version

The version should match the version downloaded from the Vagrant web site.

Congratulations, you have installed Vagrant on your Ubuntu machine. Please skip to the section on Host Common Setup.