Last active
August 29, 2015 14:02
-
-
Save murachi1208/b41ad381ed65ee65eb97 to your computer and use it in GitHub Desktop.
Chocolatey + VirtualBox + Vagrant の簡単セットアップ (Windows) ref: http://qiita.com/murachi1208/items/5b429cb7cedf76164e67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\> cinst virtualbox | |
C:\> cinst vagrant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vagrant box add {title} {url} | |
$ vagrant init {title} | |
$ vagrant up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git config --global user.name "自分のユーザー名" | |
$ git config --global user.email "自分のメールアドレス" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\> cd C:\Users\<user名> | |
C:\> mkdir vagrant | |
C:\> cd vagrant | |
C:\> vagrant box add centos6.5 https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box | |
C:\> vagrant init centos6.5 | |
C:\> vagrant up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host: 127.0.0.1 | |
Port: 2222 | |
Username: vagrant | |
Private key: C:/Users/<user名>/.vagrant.d/insecure_private_key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host: 127.0.0.1 | |
Port: 2222 | |
id:vagrand ← pw も同じ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host: 127.0.0.1 | |
Port: 2222 | |
id:vagrand ← pw も同じ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web1 Host: 127.0.0.1, Port: 2222 | |
web2 Host: 127.0.0.1, Port: 2223 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web1.vm.network :private_network, ip: "192.168.1.11" | |
web2.vm.network :private_network, ip: "192.168.1.12" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The default install location has been changed to 'C:\ProgramData\chocolatey'. | |
This install will be updated to that location in the next version. It | |
is strongly suggested you move this installation to the new location | |
as soon as possible to limit write access from all users. Do not forget | |
to update PATH & ChocolateyInstall environment variables. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ssh-keygen -t rsa -C "your_email@example.com" | |
Generating public/private rsa key pair. | |
Enter file in which to save the key (/home/vagrant/.ssh/id_rsa): | |
Enter passphrase (empty for no passphrase): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
config.vm.box = "CentOS6.5" | |
config.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box" | |
config.vm.define :web1 do |web1| | |
web1.vm.network :forwarded_port, guest: 22, host: 2222, host_ip: "127.0.0.1", id: "ssh", auto_correct: true | |
end | |
config.vm.define :web2 do |web2| | |
web2.vm.network :forwarded_port, guest: 22, host: 2223, host_ip: "127.0.0.1", id: "ssh", auto_correct: true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment