Set up a Vagrant box on macOS Si
2017-10-30 本文已影响0人
hyperRect
- Download Vagrant install package then install and verify.
link: https://www.vagrantup.com/downloads.html
$ vagrant
- Create a directory for your vagrant box environment.
mkdir work
cd work
vagrant init
- Download a box template(ubuntu) from official site
$ vagrant box add hashicorp/precise64
- Edit Vagrantfile : set vagrant box by editing the config.
$ sudo vim Vagrantfile
**make sure this line is uncommented and the value is set for the box.
config.vm.box = "hashicorp/precise64"
config.vm.network "private_network", ip: "192.168.33.10"
- Vagrant Up
$ vagrant up
$ vagrant ssh
Type vagrant ssh to log in.
- Your ubuntu vagrant box is good to go. Install nginx or whatever you want in the box.