每日一句 ( 2024920 )  

Years may wrinkle the skin, but to give up enthusiasm wrinkles the soul.

歲月留痕,只及肌膚;激情不再,皺起心靈。———— Samuel Ullman

VirtualBox壓縮vmdk、vagrant打包box一口氣全對(duì)

如何壓縮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...

win10中vagrant報(bào)錯(cuò)Failed to create the host-only adapter

我的環(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"...

vagrant+ubuntu14.4+lnmp一鍵包運(yùn)行l(wèi)aravel可能需要的步驟

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中serve添加多站點(diǎn)后無(wú)法訪問(wèn)

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 ......