Vagrantインストール
公式サイトからDLして、インストール
http://www.vagrantup.com/downloads.html
VirtualBoxインストール
公式サイトからVirtualBox 4.3.10 for OS X hostsをDLして、インストール
https://www.virtualbox.org/wiki/Downloads
使い方
参照元と同じようにvagrant box addでBox追加して、vagrant upすると以下のようなエラーが起こった。
You specified a box version constraint with a direct box file
path. Box version constraints only work with boxes from Vagrant
Cloud or a custom box host. Please remove the version constraint
and try again.
Vagrant Cloud Discoverってのがあって、そこにあるBoxを使えばいいみたい。
便利!
今回はchef/centos-6.5を利用させてもらう。
$ mkdir -p ~/Vagrant/CnetOS65
$ cd ~/Vagrant/CnetOS65
$ vagrant init chef/centos-6.5 # Vagrantfileが作成される
$ vagrant up # VirtualBoxが起動!
$ vagrant ssh # 仮想環境に接続