RVMのインストール
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
vi ~/.bash_profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
source ~/.bash_profile
rvm install 1.9.3
rvm use 1.9.3
rvm --default 1.9.3
Bundlerのインストール
gem install bundler
VeeWeeのインストール
git clone git://github.com/jedi4ever/veewee.git
vi veewee/.rvmrc
1.9.2 となっている部分を 1.9.3
cd veewee
bundle install
vagrant basebox templates
bundle exec vagrant basebox define centos_63_i386 CentOS-6.3-i386-minimal
vi definitions/centos_63_i386/definition.rb
:iso_src => "ftp://ftp.riken.jp/Linux/centos/6.3/isos/i386/CentOS-6.3-i386-minimal.iso",
vi definitions/centos_63_i386/ks.cfg
lang ja_JP.UTF-8
keyboard jp106
timezone Asia/Tokyo
vagrant basebox build centos_63_i386
>Download? (Yes/No)
ISOファイルをダウンロードするか確認されるのでYesと答える
ビルドが完了して、仮想マシンが立ち上がるまで待つ
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 7222 -l vagrant 127.0.0.1
パスワードは「definitions/centos_63_i386/definition.rb」の「ssh_password」に書かれている(ssh_userがユーザー名)
[vagrant@localhost ~]$
と表示されれば成功
vagrant basebox export centos_63_i386
生成されたboxファイルは適当な場所におく
仮想環境登録とテスト(この辺は曖昧。。。)
vagrant box add 'centos_63_i386' '/xxxxx/Development/box/centos_63_i386.box'
vagrant init centos_63_i386
vagrant up
vagrant ssh
「/vagrant 」に起動した場所がマウントされる
vagrant halt
vagrant destroy