kidoraの日記

Kia Ora! プログラマだけどハード好き!

Mac + VirtualBox + Vagrant で開発環境構築(1)

まずは下準備

VirualBoxのインストール

https://www.virtualbox.org/wiki/Downloads からダウンロードしてインストール
記事時点のバージョン 4.3.20

Vagrantのインストール

https://www.vagrantup.com/downloads.html からダウンロードしてインストール
記事時点のバージョン 1.6.5

実はgemでインストールすると最新が入らないトラップに引っかかった。

gemでインストールすると...

$ sudo gem install vagrant
Fetching: vagrant-1.5.0.gem (100%)
Thanks for wanting to use Vagrant! Unfortunately, this is not the way
to install Vagrant anymore. We now make installers for the various operating
systems Vagrant supports.

Vagrant is no longer distributed as a RubyGem. Please download the latest
version for your operating system from the URL below. If you still wish
to use the RubyGem version, you can manually install version 1.0.7. Note that
the RubyGem version hasn't been updated in over a year and will no longer
receive any updates.

Prior to installing Vagrant using the installer, make sure you uninstall
all your Vagrant gems, since they sometimes conflict.

http://www.vagrantup.com

If you want to learn more about why we don't distribute using RubyGems
anymore, please read this: http://mitchellh.com/abandoning-rubygems
Successfully installed vagrant-1.5.0
Parsing documentation for vagrant-1.5.0
Installing ri documentation for vagrant-1.5.0
Done installing documentation for vagrant after 0 seconds
1 gem installed

もうインストーラで入れろと? では、アンインストール

$ sudo gem uninstall vagrant
Remove executables:
    vagrant

in addition to the gem? [Yn]
Removing vagrant
Successfully uninstalled vagrant-1.5.0

この後、インストーラで入れたのにバージョンが1.5.0のままになってた。
whichで確認すると何やら別の場所(忘れた~ ~;)を参照してたので削除した。
アンインストールでキレイにして欲しい。
私の環境(MacOSX Lion)ではインストーラで入れた先は /usr/bin/vagrant らしい。

$ which vagrant
/usr/bin/vagrant
$ vagrant -v
Vagrant 1.6.5

veeweeのインストール

Vagrantプラグインとして入れるようなので、コマンド一発!

$ vagrant plugin install veewee
Installing the 'veewee' plugin. This can take a few minutes...
Installed the plugin 'veewee (0.4.5.1)'!

とりあえず、ここまでで準備完了...のハズ。
足りなかったら、そのときで^ ^;;