[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 :
- [教學]使用Vagrant練習環境佈署
- Ubuntu 安裝和設定 Vagrant (上)
- Building a Vagrant Box from Start to Finish
- Vagrant doc - Getting Started
0 意見:
張貼留言