


The most comprehensive tutorial on setting up a Win10+Homestead environment [pictures and text]
Before introducing how to build a Homestead environment, you need to understand several important concepts. You can read this article "Explaining the Concepts of Homestead, Vagrant and Virtual Machines" to learn more.
The following officially introduces the detailed steps to build a Homestead environment under Windows 10:
Step 1: Install VirtualBox
Install VirtualBox virtual machine Software:
Download link of this site:VirtualBox Win system 6.1.30 version
- ##Official download address:
Next. (If a VirtualBox COM object failure error occurs during the installation of the virtual machine, please refer to "
Solving the problem of failure to obtain VirtualBox COM object ")
Step 2: Installation Vagrant
Install Vagrant virtual machine management software:- Download link of this site:
vagrant Win64-bit system version 2.2.19|vagrant Win32-bit system version 2.2.19
- Official download address:
Next.
Note: Vagrant will restart the computer after successful installation. Don’t panic if the screen suddenly turns black and shuts down~
Then you can entervagrant -- in the CMD window The version command is used to test whether Vagrant is installed successfully. Displaying the version number means the installation is successful, and be sure to run it as
administrator~
Step 3: Install Homestead
1. Install homestead.box
vagrant box add laravel/homestead command; then select the corresponding virtual machine to use machine, such as virtualbox, enter 3 and press Enter to select as shown below.
homestead.box":
##Then drag the homestead.box file directly to the
command and wait for the installation to complete<pre class='brush:php;toolbar:false;'>vagrant box add laravel/homestead [box文件绝对路径]
<!--
例:
vagrant box add laravel/homestead c:\tools\homestead.box
--></pre>
Then you can use the
command to check whether the installation is successful, and at the same time check the version number (the version number shown here is 0)
注意:手动安装homestead.box
文件时,一定要把该文件放到英文目录中,并且由于本地安装homestead.box版本号为0,还要更改一下配置文件(自动安装box的则不需要设置),下文会介绍到。
2、下载homestead配置文件
点击配置文件下载地址:https://github.com/laravel/homestead,这里有两种方式下载:
(1)通过git克隆:git clone https://github.com/laravel/homestead.git
(2)点击Download ZIP
直接下载压缩包。
注:克隆和下载选任意一个即可
3、配置homestead配置文件
将上一步下载的zip文件解压并放入到用户的家目录中并更名为Homestead:
注意:Administrator
为我目录名称,你的有可能不一样。
双击运行文件中(windows下是:
init.bat
) (linux下是:init.sh
)来获取配置文件homestead.yaml
配置homestead配置文件
homestead.yaml
因为我们是手动安装homestead.box的,默认版本号为0,所以要先来修改下配置,将查找的版本号设置>=0
即可,自动安装box的则不需要设置。
找到如下图所示的homestead.rb
文件并打开:
然后设置config.vm.box_version = settings['version'] ||= '>= 0'
,如下所示:
接着我们要来配置同步的目录,找到homestead.yaml
文件并打开
//同步的目录 folders: - map: C:\Users\Administrator\marriage //宿主机位置 to: /home/vagrant/code //同步虚拟主机位置 //表示将win下的marriage目录同步到虚拟机下的code目录,也就是说无论在这两个哪个目录中修改内容都可以同步到另一个目录中。
用绝对路径或相对路径设置都可以(~代表家目录)
相对路径如下:
绝对路径如下:
我这里选择用绝对路径设置,设置完记得要保存文件~
4、获取公钥
获取公钥是为了方便每次登录输入用户名密码。
如下所示执行ssh-keygen
命令生成秘钥。
注意:win10自动开启SSH命令,但是win7就是需要安装ssh(可参考:《Windows7安装OpenSSH服务的步骤详解(亲测有效)》)。
5、启动虚拟机主机
先通过执行cd Homestead
命令切换到Homestead目录,然后执行vagrant up
命令来启动虚拟机主机
虚拟机启动成功,界面如下所示(不需要经常开启这个界面,直接使用vagrant来管理即可)
接着使用密钥连接登录虚拟机,在命令行执行vagrant ssh
命令即可(一定要在homestead目录下执行该命令)
注意:
如果SSH认真失败,删除insecure_private_key文件,该文件可以通过以下路径找到:
C:\user\Administrator\.vagrant.d\insecure_private_key 文件
重新生成vagrant密钥
ssh-keygen -f /User/Administrator(你的用户)/.vagrant.d/insecure_private_key
启动虚拟机也可不使用密钥进入,手动输入用户名和密码
用户名:vagrant 密码: vagrant
默认数据库用户名及密码
UserName:homestead PassWord:secret
至此,Win10下homestead环境就搭建好了!
在《Homestead安装运行laravel项目的步骤详解【图文】》文章中继续给大家介绍了怎么在homestead环境里安装Laravel并运行!
The above is the detailed content of The most comprehensive tutorial on setting up a Win10+Homestead environment [pictures and text]. For more information, please follow other related articles on the PHP Chinese website!

In Laravel full-stack development, effective methods for managing APIs and front-end logic include: 1) using RESTful controllers and resource routing management APIs; 2) processing front-end logic through Blade templates and Vue.js or React; 3) optimizing performance through API versioning and paging; 4) maintaining the separation of back-end and front-end logic to ensure maintainability and scalability.

Totackleculturalintricaciesindistributedteams,fosteranenvironmentcelebratingdifferences,bemindfulofcommunication,andusetoolsforclarity.1)Implementculturalexchangesessionstosharestoriesandtraditions.2)Adjustcommunicationmethodstosuitculturalpreference

Toassesstheeffectivenessofremotecommunication,focuson:1)Engagementmetricslikemessagefrequencyandresponsetime,2)Sentimentanalysistogaugeemotionaltone,3)Meetingeffectivenessthroughattendanceandactionitems,and4)Networkanalysistounderstandcommunicationpa

Toprotectsensitivedataindistributedteams,implementamulti-facetedapproach:1)Useend-to-endencryptionforsecurecommunication,2)Applyrole-basedaccesscontrol(RBAC)tomanagepermissions,3)Encryptdataatrestwithkeymanagementtools,and4)Fosterasecurity-consciousc

No, emailisnotthebostforremotecollaborationToday.Modern platformlack, Microsoft teams, Zoom, ASANA, AndTrelloFhertreal-Time Communication, Project management, Andintegrationfeaturesthancteamworkandefficiency.

Collaborative document editing is an effective tool for distributed teams to optimize their workflows. It improves communication and project progress through real-time collaboration and feedback loops, and common tools include Google Docs, Microsoft Teams, and Notion. Pay attention to challenges such as version control and learning curve when using it.

ThepreviousversionofLaravelissupportedwithbugfixesforsixmonthsandsecurityfixesforoneyearafteranewmajorversion'srelease.Understandingthissupporttimelineiscrucialforplanningupgrades,ensuringprojectstability,andleveragingnewfeaturesandsecurityenhancemen

Laravelcanbeeffectivelyusedforbothfrontendandbackenddevelopment.1)Backend:UtilizeLaravel'sEloquentORMforsimplifieddatabaseinteractions.2)Frontend:LeverageBladetemplatesforcleanHTMLandintegrateVue.jsfordynamicSPAs,ensuringseamlessfrontend-backendinteg


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

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

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

Zend Studio 13.0.1
Powerful PHP integrated development environment

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Atom editor mac version download
The most popular open source editor
