每日一句 ( 2024711 )  

To do nothing is the way to be nothing.

無(wú)所事事終將一事無(wú)成。———— Nathaniel Hawthorne

VirtualBox壓縮vmdk、vagrant打包box一口氣全對

如何壓縮VirtualBox的虛擬機vmdk文件大小并使用vagrant package成功打包鏡像box文件。環(huán)境:Windows7 vagrant1.9.5 VirtualBox4.3.12 虛擬機系統ubuntu14.04GitBash中執行命令首先vagrant ssh登錄到虛擬機中sudo dd if=/dev/zero of=/EMPTY bs=1Msudo rm -f /EMPTY切換到VirtualBox安裝目錄,執行: ./VBoxManage clonehd "/c/Users/zheng/VirtualBox VMs/ubuntu_default_15257002321...

win10中vagrant報錯Failed to create the host-only adapter

我的環(huán)境:Windows10? + vagrant 2.0.4 + virtualbox4.3.12當在win10中執行vagrant up啟動(dòng)虛擬機環(huán)境時(shí)報錯: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"...

vagrant+ubuntu14.4+lnmp一鍵包運行laravel可能需要的步驟

1. vagrant init原版ubuntu trusty環(huán)境,可能需要先離線(xiàn)下載安裝box2. 編輯Vagrantfile文件,取消注釋config.vm.network項,自定義ip。編輯底部config.vm.provision項,增加幾條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中serve添加多站點(diǎn)后無(wú)法訪(fǎng)問(wèn)

homestead添加多站點(diǎn)你可以通過(guò)Homestead.yaml文件并執行以下命令來(lái)重新初始化環(huán)境vagrant provision這個(gè)方法會(huì )導致數據庫重建(本人未測試),所以不建議使用這種方法。另一種方法可以ssh登錄后使用serve命令向nginx添加虛擬主機。serve newsite.com /home/vagrant/Code/newsite 80但運行后提示dos2unix: converting file /vagrant/scripts/serve-laravel.sh to Unix format ......