目次
c:\Users\ユーザ名>mkdir MyVagrant
c:\Users\ユーザ名>cd MyVagrant
c:\Users\ユーザ名\MyVagrant>mkdir mycentos
c:\Users\ユーザ名\MyVagrant>cd mycentos
c:\Users\ユーザ名\MyVagrant\mycentos>vagrant box add centos http://developer.nrel.
gov/downloads/vagrant-boxes/CentOS-6.5-x86_64-v20140110.box
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'centos' (v0) for provider:
box: Downloading: http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6
.5-x86_64-v20140110.box
box: Progress: 100% (Rate: 1718k/s, Estimated time remaining: --:--:--)
==> box: Successfully added box 'centos' (v0) for 'virtualbox'!
ダウンロード中
6.5にした
c:\Users\ユーザ名\MyVagrant\mycentos>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.
mycentosと並列のところにdorというフォルダを作成 メモ帳でVagrantfileを編集 IPアドレスのところのみコメントアウト 192.168.33.10の部分
dataを../dorなどというフォルダを作成して、
config.vm.synced_folder "../dor", "/var/www/html"
にする。
c:\Users\ユーザ名\MyVagrant\mycentos>vagrant up
あとはputtyでログインするだけ ユーザ名、パスワードともにvagrant IPアドレスはデフォルトの192.168.33.10
コマンドプロンプト
c:\Users\ユーザ名\MyVagrant\mycentos>vagrant suspend
mycentos内のフォルダを全部削除でもう一度mycentos内で
vagrant init centos
と打つ。