美文网首页
Set up a Vagrant box on macOS Si

Set up a Vagrant box on macOS Si

作者: hyperRect | 来源:发表于2017-10-30 15:23 被阅读0次
    1. Download Vagrant install package then install and verify.
      link: https://www.vagrantup.com/downloads.html
    $ vagrant
    
    1. Create a directory for your vagrant box environment.
    mkdir work
    cd work
    vagrant init
    
    1. Download a box template(ubuntu) from official site
    $ vagrant box add hashicorp/precise64
    
    1. 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"
    
    1. Vagrant Up
    $ vagrant up
    $ vagrant ssh
    

    Type vagrant ssh to log in.

    1. Your ubuntu vagrant box is good to go. Install nginx or whatever you want in the box.

    相关文章

      网友评论

          本文标题:Set up a Vagrant box on macOS Si

          本文链接:https://www.haomeiwen.com/subject/yynppxtx.html