Laravel 5.3 在 Win 10 上安装 Homestead
Laravel 5.3 Homestead Installation on Win 10
正在关注 >> https://laravel.com/docs/5.3/homestead
bash init.sh
cp: overwrite '/c/Users/myuser/.homestead/Homestead.yaml'? y
cp: overwrite '/c/Users/myuser/.homestead/after.sh'?
cp: overwrite '/c/Users/myuser/.homestead/aliases'?
Homestead initialized!
不知道这些是否需要覆盖?
另外,我配置homestead.yaml
文件夹:
- map: ~/Homestead
to: /home/vagrant/Code
显示错误[缺少共享文件夹的主机路径:~/Homestead]
我的宅基地安装是
$密码
/宅基地
我确定缺少某些步骤有人可以帮忙
安装方法 - 每个项目安装
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Running provisioner: shell...
SSH authentication failed! This is typically caused by the public/private
keypair for the SSH user not being properly set on the guest VM. Please
verify that the guest VM is setup with the proper public key, and that
the private key path for Vagrant is setup properly as well.
这是全新安装!
vagrant destroy && up
default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Authentication failure. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
是的,您应该覆盖这些文件以便全新安装 Homestead(以防万一)。现在,您收到此错误的原因是您的 YAML 配置错误。假设您的 Laravel 代码位于 Documents 文件夹的代码文件夹中,您的 YAML 应如下所示(注意:这是 Windows 特定的 !):
folders:
- map: "C:/Users/Username/Documents/Code"
to: "/home/vagrant/Code"
您需要将包含本地代码的文件夹映射到虚拟机中的文件夹。然后将使用共享文件夹进行设置。这样,代码文件夹中的任何代码更改都将镜像到您的 VM。
就个人而言,我更喜欢按项目安装,因为我可以在不同的 VM 上同时将多个项目 运行 映射到不同的域。在这里查看:https://laravel.com/docs/5.3/homestead#per-project-installation
正在关注 >> https://laravel.com/docs/5.3/homestead
bash init.sh
cp: overwrite '/c/Users/myuser/.homestead/Homestead.yaml'? y
cp: overwrite '/c/Users/myuser/.homestead/after.sh'?
cp: overwrite '/c/Users/myuser/.homestead/aliases'?
Homestead initialized!
不知道这些是否需要覆盖?
另外,我配置homestead.yaml
文件夹:
- map: ~/Homestead
to: /home/vagrant/Code
显示错误[缺少共享文件夹的主机路径:~/Homestead]
我的宅基地安装是 $密码 /宅基地
我确定缺少某些步骤有人可以帮忙
安装方法 - 每个项目安装
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Running provisioner: shell...
SSH authentication failed! This is typically caused by the public/private
keypair for the SSH user not being properly set on the guest VM. Please
verify that the guest VM is setup with the proper public key, and that
the private key path for Vagrant is setup properly as well.
这是全新安装!
vagrant destroy && up
default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Authentication failure. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
是的,您应该覆盖这些文件以便全新安装 Homestead(以防万一)。现在,您收到此错误的原因是您的 YAML 配置错误。假设您的 Laravel 代码位于 Documents 文件夹的代码文件夹中,您的 YAML 应如下所示(注意:这是 Windows 特定的 !):
folders:
- map: "C:/Users/Username/Documents/Code"
to: "/home/vagrant/Code"
您需要将包含本地代码的文件夹映射到虚拟机中的文件夹。然后将使用共享文件夹进行设置。这样,代码文件夹中的任何代码更改都将镜像到您的 VM。
就个人而言,我更喜欢按项目安装,因为我可以在不同的 VM 上同时将多个项目 运行 映射到不同的域。在这里查看:https://laravel.com/docs/5.3/homestead#per-project-installation