Rivers know this: there is no hurry. We shall get there some day.
河流知道這一點(diǎn):無(wú)需匆忙。我們終有一日會(huì)到達(dá)。———— A. A. Milne
如何壓縮VirtualBox的虛擬機(jī)vmdk文件大小并使用vagrant package成功打包鏡像box文件。環(huán)境:Windows7 vagrant1.9.5 VirtualBox4.3.12 虛擬機(jī)系統(tǒng)ubuntu14.04GitBash中執(zhí)行命令首先vagrant ssh登錄到虛擬機(jī)中sudo dd if=/dev/zero of=/EMPTY bs=1Msudo rm -f /EMPTY切換到VirtualBox安裝目錄,執(zhí)行: ./VBoxManage clonehd "/c/Users/zheng/VirtualBox VMs/ubuntu_default_15257002321...
我的環(huán)境:Windows10? + vagrant 2.0.4 + virtualbox4.3.12當(dāng)在win10中執(zhí)行vagrant up啟動(dòng)虛擬機(jī)環(huán)境時(shí)報(bào)錯(cuò):Failed to create the host-only adapter==> default: Clearing any previously set network interfaces...There was an error while executing `VBoxManage`, a CLI used by Vagrantfor controlling VirtualBox. The command and stderr is shown below.Command: ["hostonlyif"...
1. vagrant init原版ubuntu trusty環(huán)境,可能需要先離線下載安裝box2. 編輯Vagrantfile文件,取消注釋config.vm.network項(xiàng),自定義ip。編輯底部config.vm.provision項(xiàng),增加幾條shell。config.vm.provision "shell", path: "sources-list.sh"config.vm.provision "shell", inline: "apt-get update"config.vm.provision "shell", inline: "wget -c http://soft.vpser.net/lnmp/lnmp1.4.tar....
homestead添加多站點(diǎn)你可以通過(guò)Homestead.yaml文件并執(zhí)行以下命令來(lái)重新初始化環(huán)境vagrant provision這個(gè)方法會(huì)導(dǎo)致數(shù)據(jù)庫(kù)重建(本人未測(cè)試),所以不建議使用這種方法。另一種方法可以ssh登錄后使用serve命令向nginx添加虛擬主機(jī)。serve newsite.com /home/vagrant/Code/newsite 80但運(yùn)行后提示dos2unix: converting file /vagrant/scripts/serve-laravel.sh to Unix format ......