Installation and configuration of Composer&laravel under Windows

Source: Internet
Author: User

http://www.jianshu.com/p/2836017b5348

Initialize configuration
  1. First, make sure your PHP version is above 5.59.
  2. Open PHP extension, found in php.ini
    ;extension=php_openssl.dll
    ;extension=php_mbstring.dll
    ;extension=php_pdo_mysql.dll
    Remove the preceding semicolon and leave it intact if there is no semicolon. Install composer and use packagist China full-volume mirroring (Global Install/global configuration)
  3. Enter composer official website download page, at the bottom of the page manual download area Select the desired version download.
  4. Copy the downloaded Composer.phar to the PHP installation directory, which is the same level directory as Php.exe.
  5. Create a new Composer.bat file in the PHP installation directory and save the following code to this file.
    "%~dp0composer.phar" %*
  6. Open a command-line window and try the execution to composer --version see if the version number is correctly printed.

  7. Open a command-line window and execute the following command

    composer config -g repo.packagist composer https://packagist.phpcomposer.com

    This composer installation and configuration is complete

    Laravel Installation
  8. Open a command-line window to execute the D:   cd Xampp\htdocs Enter the site directory and execute the following code to create a Laravel project named AMS (project name customization)

    composer  Create-project laravel/laravel ams --prefer-dist        

    The following is an Apache virtual host configuration designed to simulate domain name access, and if you do not need this functionality, enter localhost/ams/public directly in the browser. If the Laravel5 Welcome screen (at the bottom of this article) is displayed normally, congratulations on your environment. Welcome interface loaded Google font file, so the first time you open may require a certain load time.

  9. Open rewrite and Vhost, found in httpd.conf

    #LoadModule rewrite_module modules/mod_rewrite.so
    #LoadModule vhost_alias_module modules/mod_vhost_alias.so
    #Include conf/extra/httpd-vhosts.conf

    Remove the previous #, if there is no #, stay the same.

  10. Locate DocumentRoot "D:/xampp/htdocs" the nearby <Directory> label pair and change the contents to the following
    <Directory /> AllowOverride all Require all granted</Directory>
  11. Enter the httpd-vhost.conf in the D:\xampp\apache\conf\extra directory and add the last
    <VirtualHost *:80>  ##ServerAdmin [email protected].example.com  DocumentRoot "D:\\xampp\\htdocs\\ams\\" ServerName ams.com ##ErrorLog "logs/dummy-host2.example.com-error.log" ##CustomLog "logs/dummy-host2.example.com-access.log" common</VirtualHost>
  12. Enter the Hosts file in the C:\Windows\System32\drivers\etc directory and add the following127.0.0.1 ams.com

  13. Whether the browser input http://ams.com/public test will display normally LARAVEL5 welcome page


Start your laravel journey!

Installation and configuration of Composer&laravel under Windows

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.