VirtualBoxのダウンロード
- Markdown: virtualbox 「VirtualBox 4.2.18 for OS X hosts」をクリックする。
Vagrantupのダウンロード
- Markdown: virtualbox
OSを取得する。
今回はcentos6.4を使用します。
$ vagrant box add centos http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130427.box
Downloading or copying the box...
Progress: 44% (Rate: 0/s, Estimated time remaining: 1:27:21)^CWaiting for cleanup before exiting...
Box download was interrupted. Exiting.
Vagrant exited after cleanup due to external interrupt.
wifiなので1時間半かかりました。
その他OSは
* Markdown: virtualbox
OSインストール
$ vagrant init centos
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'centos'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
[default] Machine booted and ready!
[default] Mounting shared folders...
[default] -- /vagrant
$ vi Vagrantfile
config.vm.network :private_network, ip: "192.168.33.10"
$ vagrant reload
$ vagrant ssh
とりあえず構築環境。