流浪者和家园

时间:2015-04-20 14:42:14

标签: laravel vagrant laravel-5 homestead

我想要完成的是在我的本地计算机上安装Vagrant和Laravel的Homestead,以便我可以取消我昨天实际删除的MAMP。

我已经安装了Vagrant和Homestead但是我后来发现我的计算机不允许我运行php artisan migrate命令,因为它说没有找到文件。

我做了一些挖掘,有人告诉我在my.cnf文件中做一些更改。

所以我登录了我的虚拟机并尝试找到该文件,但是它告诉我MySQL文件夹中没有该名称或扩展名的文件。

有人可以帮我安顿下来,这样我就可以继续我的项目吗?

Me-iMac:~ me$ vagrant box remove laravel/homestead
Box 'laravel/homestead' (v0.2.5) with provider 'virtualbox' appears
to still be in use by at least one Vagrant environment. Removing
the box could corrupt the environment. We recommend destroying
these environments first:

default (ID: e5a3663ef2cf4e91a02e8c7e99fa584b)

Are you sure you want to remove this box? [y/N] y
Removing box 'laravel/homestead' (v0.2.5) with provider 'virtualbox'...
me-iMac:~ me$ vagrant box add laravel/homestead
==> box: Loading metadata for box 'laravel/homestead'
    box: URL: https://atlas.hashicorp.com/laravel/homestead
This box can work with multiple providers! The providers that it
can work with are listed below. Please review the list and choose
the provider you will be working with.

1) virtualbox
2) vmware_desktop

Enter your choice: 1
==> box: Adding box 'laravel/homestead' (v0.2.5) for provider: virtualbox
    box: Downloading: https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.2.5/providers/virtualbox.box
==> box: Successfully added box 'laravel/homestead' (v0.2.5) for 'virtualbox'!
me-iMac:~ me$ homestead ssh
Welcome to Ubuntu 14.10 (GNU/Linux 3.16.0-23-generic x86_64)

 * Documentation:  https://help.ubuntu.com/
Last login: Mon Apr 20 14:06:45 2015 from 10.0.2.2
vagrant@homestead:~$ locate my.cnf
vagrant@homestead:~$ which mysql
/usr/bin/mysql
vagrant@homestead:~$

1 个答案:

答案 0 :(得分:1)

根据您的终端转储,我无法判断您是否已创建Homestead.yaml文件。确保这样做,以便您可以从Homestead中访问您的开发文件。运行homestead init,然后homestead edit,然后配置共享文件夹和Nginx站点。完成后,您需要再次homestead destroyhomestead up以允许更改生效。

毕竟,SSH回到Homestead,更改为您设置的共享文件夹,并尝试运行php artisan migrate,确保Laravel安装目录中确实存在artisan文件