这是我第一次设置XAMP以外的开发环境。几天来,我一直在寻找并尝试各种安装,但没有取得任何进展。
-信息OS=Mac 10.14.1VM=Parallels 14(是的,我已经安装了插件(安装流浪
以上全部安装于2018年12月12日
我找到的资源https://app.vagrantup.com/laravel/boxes/homesteadhttps://github.com/Parallels/vagrant-parallels
我真的希望有人能帮我设置这个,这样我就可以开始学习Laravel了!
首先,由于您从XAMPP迁移到Mac,我建议您先尝试代客泊车:https://laravel.com/docs/5.7/valet.它更易于安装和管理。
关于宅地,你安装了Parallels和Vagrant。
通过在终端中运行命令添加一个Vagrant框:
vagrant box add laravel/homestead
然后安装Homestead:
git clone https://github.com/laravel/homestead.git ~/Homestead
运行init脚本:
cd ~/Homestead
bash init.sh
打开~/Homestead/Homested.yaml文件以调整配置。小心凹痕和标志。
设置提供者:
provider: parallels
将包含网站文件的文件夹映射到虚拟框:
folders:
- map: ~/code
to: /home/vagrant/code
将您的第一个网站配置添加到init nginx:
sites:
- map: firstwebsite.test
to: /home/vagrant/code/firstwebsite.test/public
将一条记录添加到/etc/hosts以将域指向您的虚拟箱
192.168.10.10 firstwebsite.test
通过运行启动虚拟箱
vagrant up
尝试加载它:http://firstwebsite.test
来源:https://laravel.com/docs/5.7/homestead