0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Vagrant setup for Mac memo

Last updated at Posted at 2014-11-25

1. Vagrant install

$ vagrant -v

2. VirtualBox install

3. add box

# $ vagrant box add {title} {url}
$ vagrant box add centos65 https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box

4. init

$ mkdir -p ~/vagrant/centos65
$ cd ~/vagrant/centos65

# $ vagrant init {title}
$ vagrant init centos65

5. setting

$ vim Vagrantfile

# ポート設定 hostの8080アクセスをゲストの80に飛ばす
# config.vm.network "forwarded_port", guest: 80, host: 8080

# ip付与
# config.vm.network "private_network", ip: "192.168.33.10"

# config.vm.provider "virtualbox" do |vb|
#   # Don't boot with headless mode
#   # 仮想ウィンドウを表示する
#   vb.gui = true
#
#   # Use VBoxManage to customize the VM. For example to change memory:
#   # メモリーサイズを増やす
#   vb.customize ["modifyvm", :id, "--memory", "1024"]
# end

6. up

$ vagrant up

7. ssh

vagrant ssh

or

id: vagrant && pass: vagrant && ip: 192.168.33.10 && port: 22

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?