1. 程式人生 > >vagrant 配置並啟動

vagrant 配置並啟動

開發十年,就只剩下這套架構體系了! >>>   

$ cd ~
$ vagrant box list
centos7 (virtualbox, 0)

$ vagrant init centos7

生成配置檔案之後編輯

$ vim Vagrantfile
輸入內容:
# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
        config.vm.box = "centos7"
        config.vm.hostname = "CentOS7"
        config.vm.synced_folder ".", "/vagrant", disabled: true
        config.vm.provider "virtualbox" do |vb|
        vb.memory = "1024"
        vb.name = "CentOS7"
        end
        config.vbguest.auto_update = false
        config.vbguest.no_remote = true
end
$ vagrant plugin install vagrant-vbguest
$ vagrant up