2013年10月18日 星期五

[tool] How to install vagrant and use it


[tool] How to install vagrant and use it

1. First install vagrant
sudo apt-get install vagrant


2.Choose one box to use.

vagrant box add Ubuntu1204-64 http://files.vagrantup.com/precise64.box

After download type vagrant box list will show the list.
A list of base boxes for vagrant
Vagrant Cloud - base box for vagrant

3.
Show vagrant box list
vagrant box list

mkdir -p VirtualBox\ VMs/<the name of Box>
cd VirtualBox\ VMs/<the name of Box>

vagrant init <the name of Box>
Create a folder then type vagrant init.
vagrantfile will produce into a folder.

4. Start VM
vagrant up
Remove VM
vagrant destroy

5. ssh to VM

vagrant ssh


6. Package the environment to .box
vagrant package


Reference :

Related Posts:

0 意見:

張貼留言