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

推荐订阅源

Google Online Security Blog
Google Online Security Blog
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
Jina AI
Jina AI
博客园 - Franky
大猫的无限游戏
大猫的无限游戏
Hugging Face - Blog
Hugging Face - Blog
博客园 - 司徒正美
V
V2EX
雷峰网
雷峰网
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
F
Full Disclosure
Y
Y Combinator Blog
V
V2EX - 技术
Attack and Defense Labs
Attack and Defense Labs
S
Security @ Cisco Blogs
Schneier on Security
Schneier on Security
Microsoft Azure Blog
Microsoft Azure Blog
SecWiki News
SecWiki News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The GitHub Blog
The GitHub Blog
量子位
PCI Perspectives
PCI Perspectives
S
Secure Thoughts
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AWS News Blog
AWS News Blog
Blog — PlanetScale
Blog — PlanetScale
爱范儿
爱范儿
K
Kaspersky official blog
B
Blog
A
Arctic Wolf
Hacker News: Ask HN
Hacker News: Ask HN
L
LangChain Blog
T
Tor Project blog
P
Privacy & Cybersecurity Law Blog
Recent Announcements
Recent Announcements
宝玉的分享
宝玉的分享
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
Lohrmann on Cybersecurity
D
Docker
A
About on SuperTechFans
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
The Last Watchdog
The Last Watchdog
S
Security Affairs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy International News Feed
Simon Willison's Weblog
Simon Willison's Weblog

博客园 - 天天天蓝

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