Windows----Composer, laravel installation

Source: Internet
Author: User
Tags composer install

Environment requirements: Php+apache, and configure the root directory of PHP to "environment variables".

1. Installing composer

Use CMD to enter the directory where you want to install composer execute the following command to download the Composer.phar file:

" ReadFile (' Http://install.phpcomposer.com/installer '); " | Php

Create a new Composer.bat file under the composer installation directory with the following code:

" %~dp0composer.phar " %*

Configure the composer installation directory to the system environment variable, composer installation is complete.

At this point, use CMD to execute the following command to see the version information for composer:Composer version 1.0-dev (72cd6afdfce16f36a9fd786bc1b2f32b851e764f) 2015-12-28 17:35:19

Composer-v

2. Installing Laravel

Download Laravel installation package, download path: Http://www.golaravel.com/download.

Unzip the downloaded file in the root directory of the project, such as the blog Project root directory: E:/blog, then its directory structure such as:

Using CMD to enter the directory E:/blog, execute the following command:

Composer Install

Here Laravel installation is complete.

Set the Apache root directory to e:/blog/public, open with a browser: Http://locahost, you can see the "Laravel 5" pattern. (Note the port set by Apache)

3. Enable composer full-volume Chinese mirror

Using CMD to enter the project root E:/blog, execute the following command:

Composer Config Repo.packagist composer http://packagist.phpcomposer.com

Then lay down the root directory of the Composer.json file, at the end of the file you can see the following code, indicating the success of the activation:

" repositories " : {        "packagist": {            "type" " composer " ,             " URL " " http://packagist.phpcomposer.com "         }    }

Windows----Composer, laravel installation

Related Article

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.