[Laravel 5 Tutorial Study notes] One, Windows installation Laravel 5

Source: Internet
Author: User
Tags php framework

Recently saw some statistics, said that Laravel is currently the most used PHP framework, so you want to learn. Before actually also wanted to learn this framework, but every time to the first step to install the time stuck, helpless. Before using thinkphp, download and put to the site directory can be used, but also to toss a lot of other things. Today finally installed successfully, the original installation is very simple, record the next step ~

First, the preparation of pre-installation work 1. Configuring the PHP Environment

First you need to configure the PHP runtime environment, where I directly use the Wampserver integration package. Since the Laravel framework has some system requirements, it is recommended that you download a higher version to meet the following criteria.

    • PHP version >= 5.4
    • Mcrypt PHP Extension
    • OpenSSL PHP Extensions
    • mbstring PHP Extension
    • Tokenizer PHP Extension

I am using the 2.5 version and are installed directly under the D:\wamp .

2. Installing composer

The Laravel framework uses Composer to manage its dependencies. So before you use Laravel, you have to make sure that you have Composer installed on your computer.

To composer download the installation package under Windows, click Install directly after download complete – "Next" – select "Install Shell Menus" – "next", this step needs to be selected php.exe Path, because I use the WAMP package, installed under D:\wamp , so select the path "D:\wamp\bin\php\php5.5.12\php.exe", After continuing "Next", this time will download a composer.phar file (may be slower, recommended pre-installation fq~), after a while to wait, composer installation is complete.

Second, installation Laravel

This step is installed directly through the Composer create-project command.

Open the directory you want to install to, I choose to install to the D:\wamp\www directory, right-click "Use Composer here", or the direct Win+R key to open cmd.exe, and then go to the installation directory. Then install it by using the following command:

    1. Composer Create-project Laravel/laravel laravel5

The last one is the name of the installation build directory that can be modified, while the others cannot be modified. After a period of waiting, the installation laravel is complete.

Now, with the http://localhost/laravel5/public following, it means that the initial installation is complete.

Third, change the composer source

In the process of installing laravel, due to the use of foreign composer source, often appear the following prompt and installation failure, you can switch to some of the domestic sources to solve:

    1. [composer\downloader \transportexception
    2. the< Span class= "PLN" > "Https://packagist.org/packages.json" file could not be downloaded: Ssl/ tls already set-up for< Span class= "PLN" > this stream
    3. Failed to open Stream: cannot Connect to HTTPS server through proxy
    • First find the composer home directory from the command line:
    1. Composer Config -l -g

The contents of the [home] configuration item are as follows:[home] C:/users/administrator/appdata/roaming/composer

    • Then go to the directory and edit the config.json file under this directory as:
  1. {
  2. "config": {},
  3. "Repositories": [{
  4. "Type": "Composer",
  5. "url": "http://comproxy.cn/repo/packagist"
  6. }, {
  7. "Packagist": false
  8. }]
  9. }

Or:

  1. {
  2. "config": {},
  3. "Repositories": [
  4. {"type": "Composer", "url": "http://pkg.phpcomposer.com/ repo/packagist/"},
  5. {"packagist": false}
  6. ]
  7. }

You can then run the Laravel installation command from the new operation.

Note: the Laravel 5The site entrance is the Laravel 5 installation directory under the /public directory, rather than the Laravel 5 installation directory, this point needs attention! http://my.oschina.net/rain21/blog/418833

[Laravel 5 Tutorial Study notes] One, Windows installation Laravel 5

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.