Skip to content

Instantly share code, notes, and snippets.

@baijian
Last active December 16, 2015 01:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baijian/5356156 to your computer and use it in GitHub Desktop.
Save baijian/5356156 to your computer and use it in GitHub Desktop.
develop project using vagrant
### Install virtualbo
https://www.virtualbox.org/wiki/Downloads
### Install vagrant
http://downloads.vagrantup.com/
###
```
> vagrant init
this command just generate a Vagrantfile, this file describe the kind of machine and
resources you need to run your project.
>vagrant box add precise32 http://files.vagrantup.com/precise32.box
this command will download a base image through http(also can from local file path)
to some dir that vagrant manage;
Then you can modify your Vagrantfile to use the box you just add
>vagrant up
this command will startup the box,but it does not have a GUI, so
>vagrant ssh
to login in your virtual linux system
>vagrant destroy
if you run this command back on your host machine,
It will remove all traces of your virtual machine,
also the box same as your add before, you can use it again.
Then you can deploy networking and some provisioning work, then vagrant reload,
you can view your website throuth hostmachine port(from setting).
>vagrant suspend
>vagrant halt
>vagrant destroy
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment