本文根据 Devhints / Vagrant 翻译。代码示例及版本范围沿用原文。
Vagrant 允许您为应用程序构建独立的虚拟环境。
入门指南
添加一些基础装备:
vagrant box add precise64 http://files.vagrantup.com/precise64.box
开始使用:
mkdir test_box
cd test_box
vagrant init precise64
运行:
vagrant up
vagrant ssh
若要停止,请使用以下任一方式:
vagrant ssh # then: sudo shutdown -h now
vagrant suspend
vagrant destroy # !!
另请参阅
- Vagrant 网站 (vagrantup.com)
- Vagrantfile 速查表