Laravel deployment of the development environment Homestead installation configuration process (Windows system)

Source: Internet
Author: User
This article mainly introduces the Laravel development environment deployment of the Homestead installation configuration process (Windows system), has a certain reference value, now share to everyone, the need for friends can refer to

Laravel deployment of the development environment Homestead installation configuration process (Windows system)

First Win7 and above system requirements;

Install the virtual-box slightly; Install Vagrnt.exe Skip, install git skip;

Test after installation is complete, Gitbash open

OK next, learn a little bit about what is homestead, Balabala a bunch of homestead after a little introduction, we directly download homestead box;

Next let's start the installation of Homestead, first we need to download Homestead virtual machine box, we recommend you use Thunderbolt offline download or other offline download method download this box.

After downloading the file for Lt-homestead-3-0-0-2017082400.zip, please zip unzip the operation, after the successful decompression can see the directory lt-homestead-3-0-0-2017082400, this directory contains two files:

· Homestead-virtualbox-3.0.0.box (Tutorial customized Homestead box)

· Metadata.json (Import configuration file for box)

Then install the following

Of course, that VirtualBox, 3.0.0 is just installed good; The other does not care;

Then download the Homestead management script,

CD ~git clone Https://git.coding.net/summerblue/homestead.git homestead;

Will find a homestead directory, there is a homestead directory, and then go inside to see the details

And then run

Bash init.sh

Ll-la

Compare (View the original document) can find, more after.sh homestead.yaml aliases three things;

Original document:

Do not pay attention to these nonsense, because you can not remember to read these, when the time to use or to come back to turn the information;

Next Configure Homestead.yaml

Direct vi Homestead.yaml, found useful, yo West

This lump is the virtual machine settings, basically with the default is OK

This tuo is SSH key login configuration, authorize, is assigned to login virtual machine authorization link Public key file, filled in is the host public key file address, is basically the default value OK

Original:

The keys array option, which fills in the local SSH private key file address, when the virtual machine is initialized, copies all the SSH private key files that are filled in to the/home/vagrant/.ssh/folder of the virtual machine, thus allowing the virtual function to share the SSH key file on the host. Enable the virtual machine to have the same authentication as the host.

Right here, just add the authorize to the keys.

Original:

Next, SSH key is generated;

First check if SSH key has been generated

A look, yo ah have id_rsa and id_rsa.pub, perfect

Generate Id_rsa and id_rsa.pub This step is omitted, (the original text is longer please input the link to read);

Shared folder configuration: Folders to a folder on a homestead virtual machine.

Map corresponding to the local folder, format E:/homestead/code

To corresponds to a folder on the homestead;

Unified Configuration for Map:~/code

To:/home/vagrant/code

In order to cooperate with this ~/code, we mkdir ~/code; This code will be the file directory where we put all the laravel projects;

Site Configuration:

Allows you to access the Laravel application in the virtual machine via the domain name in the host.

Original:

Modify the host file for Windows

VI c:windows/system32/drivers/etc/hosts

Add a line 192.168.10.10 the last face Homestead.test

At this point, the site is configured well, after the creation of the Laravel project, you can access the Homestead.test site through the browser;

Database configuration:

With the default, you can

Custom variables:

If you need to customize some of the custom variables used on the virtual machine, you can define the variables in the

Not seen in the configuration, and no use, so use the original document

After the matter, the configuration is probably so done, the back can be vagrant up

Original:

The Gitbash will show up in this way.

Then vagrant SSH

Only one code folder; We skin, in the machine's c:~/code inside touch index.php;

You can see this index.php in the virtual machine.

OK after the code directly written in the ~/code inside is good; But remember to always git push;

Appendix:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.