Skip to content

Instantly share code, notes, and snippets.

@egoist
Last active August 29, 2015 14:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save egoist/89d522e261fcda3bc86f to your computer and use it in GitHub Desktop.
Save egoist/89d522e261fcda3bc86f to your computer and use it in GitHub Desktop.
Vagrant prototype / ubuntu 14.04

###Prepare

0.Install aria

wget http://downloads.sourceforge.net/project/aria2/stable/aria2-1.18.8/aria2-1.18.8-osx-darwin.dmg or paste the URL in your browser to download it.

1.Install VirtualBox

aria2c -s10 -x10 http://download.virtualbox.org/virtualbox/4.3.20/VirtualBox-4.3.20-96996-OSX.dmg

2.Install Vagrant

aria2c -s10 -x10 https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.1.dmg


###Quick Start

  1. Git clone https://github.com/0x142857/vagrant-web-prototype.git vm
  2. cd vm
  3. aria2c -s10 -x10 https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/14.04/providers/virtualbox.box http://lib.orzfly.com/mirrors/vagrant/ubuntu-trusty64-virtualbox.box
  4. rename the downloaded file to trusty64.box
  5. vagrant box add ubuntu/trusty64 trusty64.box
  6. vagrant up
  7. when it's done take a look at http://33.33.33.33 (Don't turn on a globally proxy agent like Shadowsocks when you visit a local address)

common commands: (work only if you haven't logged into the VM)

vagrant up : start the VM

vagrant reload : reload the VM if you made any change

vagrant ssh : log in to the VM

vagrant halt : stop the VM and go for a dinner

vagrant destroy : destroy the VM and say goodbye


exit Quit of VM (the VM is still running otherwise you use vagrant halt to stop it)

See more at Vagrantfile in your folder and Vagrant docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment