Win 10上的Laravel 5.3宅地安装

Win 10上的Laravel 5.3宅地安装,laravel,homestead,Laravel,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! 我不知道这些是否需要被覆盖 此外,我还配置了homestad.yaml 文件夹:

以下>>

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!
我不知道这些是否需要被覆盖

此外,我还配置了homestad.yaml

文件夹:

  - map: ~/Homestead
      to: /home/vagrant/Code
显示错误[缺少共享文件夹的主机路径:~/Homestead]

我的宅地装置是 $pwd /宅地

我确信有些步骤缺失,有人能帮忙吗 安装方法-每个项目安装

$ 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.
这是一个全新的安装

流浪汉的毁灭与毁灭

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.

是的,你应该覆盖这些文件,以便有一个干净的家园安装(以防万一)。现在,出现此错误的原因是YAML配置错误。假设您的Laravel代码位于文档文件夹中的代码文件夹中,您的YAML应该是这样的(注意:这是特定于Windows的!):

您需要将包含本地代码的文件夹映射到虚拟机中的文件夹。然后将使用共享文件夹进行设置。这样,代码文件夹中的任何代码更改都将镜像到VM



就个人而言,我更喜欢按项目安装,因为我可以让多个项目同时在映射到不同域的不同VM上运行。在这里查看:

是的,您应该覆盖这些文件,以便有一个干净的Homestead安装(以防万一)。现在,出现此错误的原因是YAML配置错误。假设您的Laravel代码位于文档文件夹中的代码文件夹中,您的YAML应该是这样的(注意:这是特定于Windows的!):

您需要将包含本地代码的文件夹映射到虚拟机中的文件夹。然后将使用共享文件夹进行设置。这样,代码文件夹中的任何代码更改都将镜像到VM



就个人而言,我更喜欢按项目安装,因为我可以让多个项目同时在映射到不同域的不同VM上运行。在这里查看:

您可以随时尝试Laragon,它的设置非常简单。谢谢Alex,但您希望安装Homestead,然后还将探索Laragon。您可以随时尝试Laragon,它的设置非常简单。谢谢Alex,但我想安装Homestead,然后还将探索Laragon。感谢您分享每个项目安装的想法,现在我只能使用默认值:SSH用户名:vagrant默认值:SSH身份验证方法:私钥默认值:警告:远程连接断开。重试..很抱歉回答晚了。尝试运行
vagrant destroy-f&&vagrant up
不工作,我通过git重置了ssh密钥,但仍然存在相同的问题尝试删除
.vagrant
文件夹,重新启动,然后运行
vagrant up
感谢您分享每个项目安装的想法,现在我只能使用默认值:SSH username:vagrant default:SSH auth method:private key default:Warning:Remote connection disconnect。重试..很抱歉回答晚了。尝试运行
vagrant destroy-f&&vagrant up
不工作,我通过git重置了ssh密钥,但仍然存在相同的问题尝试删除
.vagrant
文件夹,重新启动,然后运行
vagrant up
folders:
    - map: "C:/Users/Username/Documents/Code"
      to: "/home/vagrant/Code"