簡介
Vagrant 使用 Oracle 的VirtualBox 動態建立可配置和可移植的輕量級虛擬機。
Vagrant 當前支持 VirtualBox 4.0.x 和 4.1.x 版本。
安裝
- 前提是你已經安裝了 VirtualBox
- 下載Vagrant
- Ubuntu 系統上安裝 sudo dpkg -i vagrant_xxx.deb
- Ubuntu 添加共享庫路徑
在root權限之下,進入到 /etc/ld.so.conf.d目錄中
#vim libc.conf
填寫上 /opt/vagrant/bin
創建
- 創建工程文件夾
$ mkdir vagrant_project $ cd vagrant_project
設定
- 選取 Box
- 設定 Vagrant
$ vagrant box add {title} {url} $ vagrant init {title} $ vagrant up
使用
$ vagrant ssh