環境:html
$PSVersionTable
)Virtual Box 官方下載laravel
Vagrant 官方下載git
待...github
運行下面命令web
$ vagrant box add laravel/homestead
選擇3
virtualboxshell
==> box: Loading metadata for box 'laravel/homestead' box: URL: https://vagrantcloud.com/laravel/homestead This box can work... 1) hyperv 2) parallels 3) virtualbox 4) vmware_desktop $ Enter your choice: 3 # step 2
下載速度慢,可換其餘下載器下載
右鍵複製連接地址下載好後,運行命令進行安裝less
$ vagrant box add laravel/homestead /path/to/virtualbox.box
$ git clone https://github.com/laravel/homestead.git Homestead $ cd Homested
切換到穩定版本,homested 發行版ide
$ git checkout v7.1.2 $ init.bat
修改文件homestead.yaml
ui
folders: - map: ~/code # 替換爲項目路徑
C:WindowsSystem32driversetchosts
追加以下內容this
192.168.10.10 homestead.test
$ vagrant up
出現以下錯誤
The version of powershell currently installed on this host is less than
the required minimum version. Please upgrade the installed version of
powershell to the minimum required version and run the command again.須要更新powershell至5.x
https://docs.microsoft.com/en...
等待初始化完成後,訪問 http://homestead.test
啓動後修改
homestead.yaml
文件須要更新服務
$ vagrant reload --provision
中止服務
$ vagrant halt
若是這對你有幫助,或者能幫你節省一些時間,不如,點個贊吧~