安装Homestead问题


大神们好,今天安装Homestead出现了下列问题,请帮忙看看。

  1. 我通过git 下载了Homestead,git clone https://github.com/laravel/homestead.git ~/Homestead
  2. 执行 bash init.sh
  3. 使用迅雷下载了 laravel/homestead,下载之后的文件名不是以.box结尾的,而是:
    eb589afc-0a3a-4e20-91c6-91c99add5e07
  4. 不管三七二十一,直接执行:
    vagrant box add laravel/homestead ~/Downloads/eb589afc-0a3a-4e20-91c6-91c99add5e07
  5. 查看了一下vagrant box list
    laravel/homestead (virtualbox, 0)
  6. 配置了一下Homestead.yaml
    ---
    ip: "192.168.10.10"
    memory: 2048
    cpus: 1
    provider: virtualbox
    
    authorize: ~/.ssh/id_rsa.pub
    
    keys:
        - ~/.ssh/id_rsa
    
    folders:
        - map: /data/website/laravel
          to: /home/vagrant/code
    
    sites:
        - map: homestead.test
          to: /home/vagrant/code/public
    
    databases:
        - homestead
    
    # blackfire:
    #     - id: foo
    #       token: bar
    #       client-id: foo
    #       client-token: bar
    
    # ports:
    #     - send: 50000
    #       to: 5000
    #     - send: 7777
    #       to: 777
    #       protocol: udp
    7. 执行 homestead up,提示 zsh: command not found: homestead
    8. 直接执行 vagrant up,提示:
    Bringing machine 'homestead-7' up with 'virtualbox' provider...
    ==> homestead-7: Box 'laravel/homestead' could not be found. Attempting to find and install...
        homestead-7: Box Provider: virtualbox
        homestead-7: Box Version: >= 6.0.0
    ==> homestead-7: Loading metadata for box 'laravel/homestead'
        homestead-7: URL: https://vagrantcloud.com/laravel/homestead
    ==> homestead-7: Adding box 'laravel/homestead' (v6.1.0) for provider: virtualbox
        homestead-7: Downloading: https://vagrantcloud.com/laravel/boxes/homestead/versions/6.1.0/providers/virtualbox.box
    ==> homestead-7: Box download is resuming from prior download progress
        homestead-7: Progress: 0% (Rate: 10703/s, Estimated time remaining: 33:06:58)
    问题:
    1. 命令为啥找不到?
    2. 自己添加的box为啥不被识别?是不是名称不对,还是啥问题?
    3. 正确的玩法是什么?

Vote Vote Cancel Collect Collect Cancel

<< 上一篇: 推荐个 Laravel 开发的 CMS

>> 下一篇: laravel 5.5 定时任务连接sqlserver数据库报错问题