Skip to content

Instantly share code, notes, and snippets.

@yukpiz
Created October 13, 2015 08:31
Show Gist options
  • Save yukpiz/af1bbd82c0b304dda603 to your computer and use it in GitHub Desktop.
Save yukpiz/af1bbd82c0b304dda603 to your computer and use it in GitHub Desktop.

Vagrantをとりあえず使ってみるだけ

VirtualBoxのインストール

以下から
https://www.virtualbox.org/

Vagrantのインストール

以下から
https://www.vagrantup.com/

Ubuntu15.04を構築する

使えるテンプレは以下から
http://www.vagrantbox.es/

$ vagrant box add Ubuntu1504 https://github.com/kraksoft/vagrant-box-ubuntu/releases/download/15.04/ubuntu-15.04-amd64.box
$ vagrant init Ubuntu1504
$ vim Vagrantfile
+ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+   config.vm.box = "Ubuntu1504"
+   config.vm.network "private_network", ip: "192.168.xxx.xxx"
+   config.vm.provider "virtualbox" do |vb|
+     vb.customize ["modifyvm", :id, "--memory", "1024"]
+   end
+ end

$ vagrant up
$ vagrant global-status #id控える
$ vagrant ssh {id} #Cygwinとかでsshが使えること
# vagrant/vagrantでログインできる
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment