想搭建一个php环境
1、下载安装vagrant、virtualBox
https://www.vagrantup.com/downloads
https://www.virtualbox.org/wiki/Downloads
2、安装Homestead Vagrant盒子,选择virtualbox
vagrant box add laravel/homestead
1) hyperv
2) parallels
3) virtualbox
Enter your choice: 3
3、安装Homestead,新电脑没装git也顺便装了一下,连github的速度神出鬼没,第一次超时第二次几秒搞定,然后切换到Homestead目录下初始化,根据需求配置Homestead.yaml
git clone https://github.com/laravel/homestead.git ~/Homestead
~ % cd Homestead
Homestead % bash init.sh
启动虚拟机,报错提示key不存在,新生成一个
Homestead % vagrant up
Check your Homestead.yaml (or Homestead.json) file, the path to your private key does not exist.
% ssh-keygen -t rsa -b 4096 -C "xxxx@xx.com"
重新启动,还是报错,先这样吧
————————————————————————————
发现好像是M1不支持VirtualBox......
行吧,返回用前面日志用Docker部署好了,目前碰到最大的问题还是mysql的登录用户权限问题,暂时没能在docker-compose里面一次性处理