Laravel5 installation process-Windows 7

Source: Internet
Author: User
: This article mainly introduces Laravel5 installation process-Windows 7. if you are interested in the PHP Tutorial, refer to it. Installing Laravel 5.0 in indows

1. configure the PHP environment

First, you need to configure the PHP runtime environment. as the Laravel framework has some system requirements, we recommend that you download a higher version to meet the following conditions.

PHP version> = 5.4

Mcrypt PHP extension

OpenSSL PHP extension

Mbstring PHP extension

Tokenizer PHP extension

I used Xampp.

2. install Composer

Laravel framework uses the "http://getcomposer.org/" \ o "" \ t "http://9iphp.com/web/laravel/_blank" Composer to manage its dependencies. Therefore, before using Laravel, you must confirm whether the Composer is installed on your computer.

Composer-setup.exe


Go to HYPERLINK "https://getcomposer.org/download/" \ o "" \ t "http://9iphp.com/web/laravel/_blank" Composer to download the installation package under Windows. after the download is complete, double-click Install-"Next"-select "Install Shell menus”-{next}, this step selects the php.exe path, install it in D: \ xampp \ php, so select the path and continue "Next". a composer will be downloaded. after a while, the Composer installation is complete.

3. install Laravel

This step is directly installed using the Composer Create-Project command.

Open the directory to which you want to install it. I choose "D: \ xampp \ htdocs", right-click "Use Composer Here", or press "Win + R" to open cmd.exe, then run the cd command to enter the installation directory. Then run the following command to install:

Composer create-project laravel/laravel laravel5

The last one is the name of the installation and generation directory, which can be modified, while others cannot be modified. After a period of waiting, Laravel will be installed.

Now the following content is displayed through http: // localhost/laravel5, indicating that the initial installation is complete.


4. configuration of composer windows environment variables
Windows 7 64-bit system, update Composer, and then execute

Composer self-update

Windows global variable configuration method:


(1) composer

#! /Bin/sh

Dir = $ (d = $ (dirname "$0"); cd "$ d" & pwd)

# See if we are running in cygwin by checking for cygpath program

If command-v 'cygpath'>/dev/null 2> & 1; then

# Cygwin paths start with/cygdrive/which will break windows PHP,

# So we need to translate the dir path to windows format. However

# We cocould be using cygwin PHP which does not require this, so we

# Test if the path to PHP starts with/cygdrive/rather than/usr/bin.

If [[$ (which php) ==/ cygdrive/*]; then

Dir = $ (cygpath-m $ dir );

Fi

Fi


Dir = $ (echo $ dir | sed's // \/g ')

Php "$ {dir}/composer. phar" $ *

(2) Composer. phar


COMPOSER. phar composer,

The installed directory is C: \ ProgramData \ ComposerSetup \ bin.


Configure in WINOWS environment variables

User variable

COMPOSER_HOME = C: \ ProgramData \ ComposerSetup

PATH =; % COMPOSER_HOME % \ bin;

System variable Comoposer = 1


Composer. phar composer


Note: If global variables are not configured in php


PHP_HOME = D: \ xampp

PATH =; % PHP_HOME % \ php \ ext;



5. Laravel 5 configuration of windows environment variables


Composer global require "laravel/installer = ~ 1.1"

Generate the Vendor folder in the current directory

User variable configuration in Windows

LAEAVEL_HOME = D: \ xampp \ php \ vendor \

PATH =; % LAEAVEL_HOME % \ bin;


The Vendor folder contains LAEAVEL.





6. last step


Go to the installation directory and execute:

Php artisan serve


Access Directory http: // localhost: 8000



Resource download larval all source http://download.csdn.net/detail/heavenhors/8617175

Laravel tool composer http://download.csdn.net/detail/heavenhors/8617117







The above introduces Laravel5 installation process sharing-Windows 7, including some content, hope to be helpful to friends who are interested in PHP tutorials.

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.