Vagrant 宅地2.0,流浪者和虚拟箱运行速度比MAMP慢很多
我刚刚在OSX 10.10(约塞米蒂)上的VirtualBox上为Laravel 5安装了Homestead 2.0 vagrant服务器,它的运行速度比MAMP慢得多 我真的很想使用Homestead,但是加载页面的1-3秒延迟变得非常烦人,然而每个加载请求在MAMP上都是即时的 我的设置是否遗漏了什么 亚马尔家园:Vagrant 宅地2.0,流浪者和虚拟箱运行速度比MAMP慢很多,vagrant,virtualbox,mamp,laravel-5,homestead,Vagrant,Virtualbox,Mamp,Laravel 5,Homestead,我刚刚在OSX 10.10(约塞米蒂)上的VirtualBox上为Laravel 5安装了Homestead 2.0 vagrant服务器,它的运行速度比MAMP慢得多 我真的很想使用Homestead,但是加载页面的1-3秒延迟变得非常烦人,然而每个加载请求在MAMP上都是即时的 我的设置是否遗漏了什么 亚马尔家园: --- ip: "192.168.10.10" memory: 2048 cpus: 2 authorize: ~/.ssh/id_rsa.pub keys: - ~
---
ip: "192.168.10.10"
memory: 2048
cpus: 2
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: /Users/jackbarham/Code
to: /home/vagrant/Code
sites:
- map: tasks.mac
to: /home/vagrant/Code/tasks/public
databases:
- homestead
variables:
- key: APP_ENV
value: local
主持人:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
192.168.10.10 tasks.mac
127.0.0.1 tasks-mamp.mac # MAMP PRO - Do NOT remove this entry!
我在reddit/r/laravel上问了同样的问题,得到了答案:
来源:在我使用Windows作为主机的情况下也是如此,这是因为VirtualBox使用vboxsf作为文件系统将文件从主机装载到来宾,我不知道为什么,但速度太慢了 在GUEST(Ubuntu16.04)上,我使用CIFS将工作文件夹安装为网络文件夹,运行速度更快 在客人方面,我使用以下方法:
在主机端(mac),我认为您应该遵循以下说明:或者,根据相同的reddit帖子,您可以向每个
文件夹添加类型:nfs
settings["folders"].each do |folder|
config.vm.synced_folder folder["map"], folder["to"], type: folder["type"] ||= nil
end
settings["folders"].each do |folder|
config.vm.synced_folder folder["map"], folder["to"], type: folder["type"] ||= nil, :nfs => true
end
config.vm.network "private_network", type: "dhcp"