「F」のIT Flavor

2013-10-20

Windows8にVagrantをインストールしてCentOSを入れる

| 15:27

Windows8(64bit)にVagrant1.3.5をインストールし、CentOS6.4を入れる

Rubyのインストール

http://rubyinstaller.org/

からRuby 2.0.0-p247 (x64)をダウンロードしてインストール

■VertualBoxのインストール

https://www.virtualbox.org/

からVirtualBox 4.3 for Windows hosts をダウンロードしてインストール

Vagrantインストール

http://www.vagrantup.com/

からVagrant_1.3.5.msiダウンロードしてインストール

再起動して、バージョン確認

C:\Users\xxxx>vagrant -v
Vagrant 1.3.5

■CentOS6.4 x86_64 Minimalをインストール

以下のコマンドを入力

vagrant init centos64_64 http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130731.box

vagrant up

C:\Users\xxxx>vagrant init centos64_64 http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130731.box
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.

C:\Users\xxxx>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Box 'centos64_64' was not found. Fetching box from specified URL for
the provider 'virtualbox'. Note that if the URL does not have
a box for this provider, you should interrupt Vagrant now and add
the box yourself. Otherwise Vagrant will attempt to download the
full box prior to discovering this error.
Downloading or copying the box...
Extracting box...ate: 515k/s, Estimated time remaining: --:--:--)
Successfully added box 'centos64_64' with provider 'virtualbox'!
[default] Importing base box 'centos64_64'...
[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] The guest additions on this VM do not match the installed version of
VirtualBox! In most cases this is fine, but in rare cases it can
cause things such as shared folders to not work properly. If you see
shared folder errors, please update the guest additions within the
virtual machine and reload your VM.

Guest Additions Version: 4.2.16
VirtualBox Version: 4.3
[default] Mounting shared folders...
[default] -- /vagrant

C:\Users\xxxx>

ssh接続

PuTTYlocalhost:2222 へ接続する

ユーザ名:vagrant パスワードvagrant

VMの終了、起動

vagrant halt

vagrant up

トラックバック - http://d.hatena.ne.jp/fitflavor/20131020/1382250424
リンク元