Skip to content

Instantly share code, notes, and snippets.

@murachi1208
Last active August 29, 2015 14:01
Show Gist options
  • Save murachi1208/2d13c28e96b7b9044f7f to your computer and use it in GitHub Desktop.
Save murachi1208/2d13c28e96b7b9044f7f to your computer and use it in GitHub Desktop.
Chocolatey + VirtualBox + Vagrant Shareを使ってみた(Windows) ref: http://qiita.com/murachi1208/items/841e020f6a261c646850
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "centos65"
config.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box"
config.vm.network :forwarded_port, guest: 80, host: 8080
config.vm.provision "shell", inline: <<-EOT
yum -y update
yum install -y httpd
rm -rf /var/www
ln -fs /vagrant /var/www
mkdir /var/www/html
echo "<h1>Hello, Vagrant Cloud.</h1>" > /vagrant/html/index.html
service httpd start
EOT
end
C:\> vagrant login
...
If you don't have a Vagrant Cloud account, sign up at vagrantcloud.com
Username or Email:
Password (will be hidden):
You're now logged in!
C:\> vagrant login
...
If you don't have a Vagrant Cloud account, sign up at vagrantcloud.com
Username or Email:
Password (will be hidden):
You're now logged in!
==> default: Your Vagrant Share is running! Name: delicate-lion-6691
==> default: URL: http://delicate-lion-6691.vagrantshare.com
==> default: Your Vagrant Share is running! Name: delicate-lion-6691
==> default: URL: http://delicate-lion-6691.vagrantshare.com
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "centos65"
config.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box"
config.vm.network :forwarded_port, guest: 80, host: 8080
config.vm.provision "shell", inline: <<-EOT
yum -y update
yum install -y httpd
rm -rf /var/www
ln -fs /vagrant /var/www
mkdir /var/www/html
echo "<h1>Hello, Vagrant Cloud.</h1>" > /vagrant/html/index.html
service httpd start
EOT
end
C:\> vagrant share
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment