惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
罗磊的独立博客
The GitHub Blog
The GitHub Blog
V
V2EX
Last Week in AI
Last Week in AI
博客园 - 聂微东
MyScale Blog
MyScale Blog
美团技术团队
L
LangChain Blog
博客园 - Franky
腾讯CDC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园_首页
S
SegmentFault 最新的问题
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Stack Overflow Blog
Stack Overflow Blog
量子位
小众软件
小众软件
宝玉的分享
宝玉的分享
J
Java Code Geeks
Google DeepMind News
Google DeepMind News
D
Docker
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

博客园 - 天天天蓝

JDK 国内源 jenkins spring cloud springboot spring 文章索引 java文章索引 小程序 AWAIT ASYNC ES6转ES5解决 centos vsftpd centos nginx linux 修改配色 mac 常用技巧 ryzen nvidia hackintosh mysql count 主键之坑 git命令 MYSQL 注释 yaf twig配置 1.YAF 的安装 yaf nginx 设置 ubuntu 16 阿里云 vsftpd
win10下 homestead 安装
天天天蓝 · 2016-12-11 · via 博客园 - 天天天蓝

1.安装VirtualBox 和 Vagrant

2.git或者composer安装 homestead

git clone https://github.com/laravel/homestead.git Homestead

composer global require "laravel/homestead=~2.0"

~/.composer/vendor/bin 目录添加到 PATH 环境变量中后,可执行homestead

3.SSH证书

使用cmder集成的SSL工具生成 

4. BOX

下载下来的 .box 文件,可以使用以下方法导入:

.box 的同文件夹下创建一个 metadata.json 文件,内容为以下

{
    "name": "laravel/homestead",
    "versions": 
    [
        {
            "version": "0.4.4",
            "providers": [
                {
                  "name": "virtualbox",
                  "url": "homestead-virtualbox-0.4.4.box"
                }
            ]
        }
    ]
}
vagrant box add metadata.json

运行 list 命令查看是否添加成功:

vagrant box list

Homestead 版本

所有的 homestead 历史版本可以在这里看到:https://github.com/laravel/homestead/releases

使用以下命令可查看 homestead 版本:

$ homestead -version
Laravel Homestead version 2.2.1

安装 homestead 特定版本:

$ composer global require "laravel/homestead:~2.2.0"

删除 homestead 之前的版本,然后使用最新版本:

$ composer global remove laravel/homestead
$ composer global clear-cache
$ composer global require laravel/homestead
$ vagrant destroy && vagrant up

------------------

操作

增加站点

方式一

  1. Homestead.yaml 文件中增加站点
  2. Homestead 目录中执行 vagrant provision

会破坏以后数据库

方式二 Homestead环境中的 serve 命令

  1. SSH 进入 Homestead 环境中
  2. 执行下列命令serve domain.app /home/vagrant/Code/path/to/public/directory 80

附:Homestead命令大全

命令解释
up 启动homestead
halt 停止homestead
init 创建初始化的homestead.yaml
edit 编辑homestead.yaml
suspend 挂起homestead
resume 继续挂起的homestead
ssh 通过ssh登录homestead
run 通过ssh在homestead上运行命令
status 获取homestead的状态
list 列表命令
help 显示命令的帮助
provision 重新配置homestead
destory 销毁homestead
update 更新homestead镜像

参考

文/Aufree(简书作者)
原文链接:http://www.jianshu.com/p/12749ec68abb