本文经授权转自 PHPHub 社区
链接
- Homestead 环境部署脚本 - 使用此脚本来构造 Homestead box 的
- Homestead 主项目 repo - Homestea 是一个 Vagrant 项目
- Homestead 文档
- Vagrant 的盒子相关操作文档
- Homestead 所有版本列表
- 百度盘 Homestead 主要版本下载
Homestead Box 版本
默认使用命令:
vagrant box add laravel/homestead
安装的盒子是最新版本,如当前最新版本的 Homestead 为 v0.4.4。
Laravel 社区对新技术保持比较开放的姿态,所以 Homestead 的最新版一般都使用比较新的软件,如 PHP7,推崇 HHVM,MYSQL 5.7 等。
如果你因特殊原因,想使用老版本的话,如项目需要使用 PHP5.6(v0.3.3 版本)。
Homestead 的所有 box 版本信息:https://atlas.hashicorp.com/laravel/boxes/homestead/
下载指定版本的命令:
$ vagrant box add laravel/homestead --box-version=0.3.3$ vagrant box add laravel/homestead --box-version=0.2.7
file
上面的几个版本可前往百度盘下载:http://pan.baidu.com/s/1hrN55w4
下载加速
国内因为网络的原因,默认的盒子安装命令 vagrant box add laravel/homestead 变得不适用。
你可以使用以下方法来加速下载和添加盒子。
1. 下载链接
首先获取盒子最终下载链接:

然后就可以使用第三方多线程,支持断点续传的工具进行下载了。
注意,请勿使用迅雷离线下载,亲测下载后的文件会损坏。
我把目前几个大版本下载上传到百度盘,可前往下载 -> http://pan.baidu.com/s/1o7KB2ZK 。
附上文件的 CheckSum:
➜ Boxes openssl sha1 homestead-virtualbox-0.2.7.boxSHA1(homestead-virtualbox-0.2.7.box)= 76e67b203a39f77d617ad9ed00d2aec0c79e7680➜ Boxes openssl sha1 homestead-virtualbox-0.4.4.boxSHA1(homestead-virtualbox-0.4.4.box)= 059821e503c5441e9243edd687e061e5ce0a1bec➜ Boxes openssl sha1 homestead-virtualbox-0.3.3.boxSHA1(homestead-virtualbox-0.3.3.box)= 41967c26e7fd8b0fae84c3ecbd0e4058c0ab2bb1
2. 导入盒子
下载下来的 .box 文件,可以使用以下方法导入:
在 .box 的同文件夹下创建一个 metadata.json 文件,内容为以下
{ "name": "laravel/homestead", "versions": [ { "version": "0.4.4", "providers": [ { "name": "virtualbox", "url": "homestead-virtualbox-0.4.4.box" } ] } ]}
字段说明
- version - 可以指定当前盒子导入的版本标示;
- url - 支持 绝对文件路径 和 相对文件路径
运行以下命令导入:
vagrant box add metadata.json
运行 list 命令查看是否添加成功:
vagrant box list
操作截图:
file
感谢 @solarhell 提供的此方法,他的博文 - 使用Homestead搭建开发环境。
Homestead 版本
所有的 homestead 历史版本可以在这里看到:https://github.com/laravel/homestead/releases 。
使用以下命令可查看 homestead 版本:
$ homestead -versionLaravel 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

Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

PHP logging is essential for monitoring and debugging web applications, as well as capturing critical events, errors, and runtime behavior. It provides valuable insights into system performance, helps identify issues, and supports faster troubleshoot

Laravel simplifies HTTP verb handling in incoming requests, streamlining diverse operation management within your applications. The method() and isMethod() methods efficiently identify and validate request types. This feature is crucial for building

The Storage::download method of the Laravel framework provides a concise API for safely handling file downloads while managing abstractions of file storage. Here is an example of using Storage::download() in the example controller:


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Dreamweaver CS6
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
