When installing vagrant in Ubuntu, you must first install virtualbox.
Step 1:
Download the Deb package for Ubuntu in the https://www.virtualbox.org/wiki/Linux_Downloads.
Step 2:
Run the sudo dpkg-I virtualbox-4.3_4.3.14-95030 In the Ubuntu terminal ~ Ubuntu ~ Raring_amd64.deb
If the system prompts that the dependency package is missing, run sudo apt-get-F install. Fix the dependency and execute sudo dpkg-I virtualbox-4.3_4.3.14-95030 again ~ Ubuntu ~ Raring_amd64.deb
Step 3:
If the system prompts failed and trying without dkms, sudo apt-Get install dkms is required.
Step 4:
Run virtualbox -- help. If the help document is displayed, the installation is successful.
Step 5:
Run sudo apt-Get install vagrant.
(We recommend that you use the root user to execute the preceding command)
Configure box before running vagrant:
$ vagrant box add {title} {url}$ vagrant init {title}$ vagrant up
For example (ub14 means Ubuntu 14.04 ):
vagrant box add ub14 https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.boxvagrant init ub14vagrant up
So far, Ubuntu has been installed and configured with vagrant.
The following are common commands:
$ Vagrant init # initialization $ vagrant up # Starting a virtual machine $ vagrant halt # disabling a virtual machine $ vagrant reload # restarting a virtual machine $ vagrant SSH # SSH to virtual machine $ vagrant status # viewing the virtual machine running status $ vag destroy # destroy the current Virtual Machine
Install vagrant in Ubuntu