Homestead 安装需要知道的一些信息
本文经授权转自 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

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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

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

Hot Topics











In PHP, password_hash and password_verify functions should be used to implement secure password hashing, and MD5 or SHA1 should not be used. 1) password_hash generates a hash containing salt values to enhance security. 2) Password_verify verify password and ensure security by comparing hash values. 3) MD5 and SHA1 are vulnerable and lack salt values, and are not suitable for modern password security.

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values and handle functions that may return null values.

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

The core benefits of PHP include ease of learning, strong web development support, rich libraries and frameworks, high performance and scalability, cross-platform compatibility, and cost-effectiveness. 1) Easy to learn and use, suitable for beginners; 2) Good integration with web servers and supports multiple databases; 3) Have powerful frameworks such as Laravel; 4) High performance can be achieved through optimization; 5) Support multiple operating systems; 6) Open source to reduce development costs.

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip
