Vagrant 準備
やることは5つ
- VirtualBox のインストール
- Vagrant のインストール
- Box の取得
- 仮想マシンの初期化
- 仮想マシンの立ち上げ
1. VirtualBox のインストール
https://www.virtualbox.org/
からダウンロード
2. Vagrant のインストール
http://www.vagrantup.com/
からダウンロード
3. Box の取得
Box を公開してくれている下記サイトからCentOS6.4 64 bit版を取得
http://www.vagrantbox.es/
$ vagrant box add centos64 \ http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130427.box
今あるBoxの確認
$ vagrant box list centos64 (virtualbox)
4. 仮想マシンの初期化
- 仮想マシン用のディレクトリ作成
- 仮想マシンの初期化
$ mkdir centOSVM $ cd centOSVM $ vagrant init centos64 $ ls Vagrantfile
Vagrantfile というファイルができる
5. 仮想マシンの立ち上げ
$ vagrant up
Vagrantfile があるディレクトリで実行
VirtualBox に仮想マシンができている
$ vagrant ssh
これでログインできます。
以上。