安装 vagrant homestead步骤

 

  

vagrant box add laravel/homestead /Users/user/Downloads/virtualbox.box #virtualbox.box存放的位置

  

cd ~
git clone https://github.com/laravel/homestead.git Homestead

  

cd Homestead
bash init.sh

  

vagrant up

可能会报: homestead-7: Box 'laravel/homestead' could not be found. Attempting to find and install...

原因:下载回来的virtualbox.box虽然是5.0的,但是在vagrant box list 中显示为 0 在下载回来的homestead默认的配置中就会出现错误
解决方法:
在Homesteadscripts文件夹中,打开homestead.rb文件
把

config.vm.box_version = settings["version"] ||= ">= 5.0.0"
改为

config.vm.box_version = settings["version"] ||= ">= 0"

  

重新构建 可用 vagrant destroy    删除box    vagrant box remove  boxname

mysql默认用户账号  用户名:homestead  密码:secret

备注:尽量使用最新版本的 vagrant 和 virtualbox

不要用 vagrant init   新生成的Vagrantfile 中没有加载homestead.yaml 文件  会出现很多问题

原文地址:https://www.cnblogs.com/wangxusummer/p/8782949.html