2021
02-21
02-21
vagrant+virtualBox构建虚拟机的方法
一、介绍Vagrant是一个构建和管理虚拟机(VirtualBox)的工具。我的环境:Mac+Vagrant+VirtualBox网盘下载地址:链接:https://pan.baidu.com/s/1LKacXPQcgh3MjgWiIZ0zhQ密码:n998二、安装VirtualBox:https://www.virtualbox.org/wiki/DownloadsVagrant:http://downloads.vagrantup.co三、在线创建虚拟机1.在官网找到自己想要安装的操作系统:https://app.vagrantup.com/boxes/search2.点进去,执行命令创建并启动虚拟机:ht...
继续阅读 >
如果你在开发应用和发布应用的时候采用了不同的环境,那么在正式使用时,应用可能出现许多奇怪的BUG。如果你是在开发团队里工作,那么保证各位的开发环境和所有的库文件都是最新的并且处在同一版本,会是件更麻烦的事。如果你在Windows平台开发并准备部署到Linux(或其他非Windows的平台)上,或者你是在开发团队里工作,那你应该考虑用个虚拟机。这虽然听起来挺麻烦,但是Vagrant这个程序可以辅助你用几步就创建一个简单的虚拟...
ThefirststepforanyprojecttouseVagrantistoconfigureVagrantusingaVagrantfile.ThepurposeoftheVagrantfileistwofold:Marktherootdirectoryofyourproject.AlotoftheconfigurationofVagrantisrelativetothisrootdirectory.Describethekindofmachineandresourcesyouneedtorunyourproject,aswellaswhatsoftwaretoinstallandhowyouwanttoaccessit.Vagran...
Insteadofbuildingavirtualmachinefromscratch,whichwouldbeaslowandtediousprocess,Vagrantusesabaseimagetoquicklycloneavirtualmachine.ThesebaseimagesareknownasboxesinVagrant,andspecifyingtheboxtouseforyourVagrantenvironmentisalwaysthefirststepaftercreatinganewVagrantfile.1.安装Ifyouranthecommandsonthegettingstartedoverviewpage,theny...