Last active
December 16, 2015 01:38
-
-
Save baijian/5356156 to your computer and use it in GitHub Desktop.
develop project using vagrant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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