virtualBox结合vagrant离线安装centos7

wxtyixiao 2020-05-05

VirtualBox-6.0.10-132072-Win.exe

https://www.virtualbox.org/wiki/Downloads

vagrant_2.2.5_x86_64.msi

https://www.vagrantup.com/downloads.html

Vagrant-CentOS-7.box

https://github.com/tommy-muehle/puppet-vagrant-boxes/releases/download/1.1.0/centos-7.0-x86_64.box

安装说明:

$ vagrant box add {title} {url}

$ vagrant init {title}

$ vagrant up

vagrant box add是添加box的命令,其中{title}用于识别建立的虚拟机,这里使用 centos7 ,{url}是下载到本地box(centos-7.0_x86_64.box)的路径,也可以是服务器端的URL。

安装box

vagrant box add centos7 d:/soft/centos-7.0-x86_64.box

window系统中应该是放到了 C:\Users\当前用户名.vagrant.d\boxes\下。

virtualBox结合vagrant离线安装centos7

vagrant init centos7 
//如果是新添加的box,必须执行本步骤,初始化一次之后,就不需要再执行本步骤 ,生成Vagrantfile文件,里面有很多配置信息。 
A `Vagrantfile` has been placed in this directory.
You are now ready to `vagrant up` your first virtual environment!
Please read the comments in the Vagrantfile as well as documentation on `vagrantup.com` for more information on using Vagrant.

启动

vagrant  up

virtualBox结合vagrant离线安装centos7

 来源:站长资讯

相关推荐