YII2 Project installation procedure and abnormal record

Source: Internet
Author: User
Tags mirror website composer install

Project Environment:

Operating system: Windows 7

Version management: Git

This project I was created on the Mac, the environment above the MAC is also twists Ah! But my colleague's environment is above the windows, because is the front-end classmate, so I had to fencing again 、、、

1. Clone code to Local

First, clone the project from the code-hosting platform to local, without any problems.

2. Add various environment variables

I have added PHP, composer, and git three environment variables, which is not a very big step.

Mainly composer installation, I refer to the official website manual installation, the official website may want to fan Qiang to access. I put his code out to prevent people from being inconvenient.

c:\users\username>CD c:\bin//into the installation directory, this is the address he wants to download, you can enter any directory you want to install
C:\bin"ReadFile (' Https://getcomposer.org/installer '); " | php//below Composer.phar, run this step must first add PHP to the environment variable

C:\bin>echo"%~dp0composer.phar" %*>composer.bat
Create a batch file, and then put that directory into your environment variable

C:\Users\username>composer -V
Run the above command to detect if the installation settings are correct

3. Install composer plug-in

This step I took a great deal of effort to fix, YII2 is to install "Fxp/composer-asset-plugin" plug-in.

" fxp/composer-asset-plugin:~1.1 "

Above is the official website command, I use this command has not been successful. I was using the following command to succeed

" Fxp/composer-asset-plugin: @dev "

4. Modify composer image

If you have a fast internet connection and a VPN, I'm not saying.

Modify the global configuration file for composer directly

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

The above command I was from composer China Mirror website directly to use, you can direct Baidu "composer China Mirror"

5, composer INSTALL-VVV

Nothing to say, install a variety of resource packs. The reason-VVV is to view the install details

This is a long wait Ah! It's useless to install a domestic mirror 、、、

、、、、、、

、、、、、、

、、、、、、

In the meantime, if it feels stuck, it terminates the procedure, and I have executed several times to execute the command.

6. Initialize Project

Init Project Environment

Init

Configure Database Links

Configure your database information in comon\config\main-lcal.php

Migrating Database Scripts

Yii Migrate

7, can happily preview the 、、、

YII2 Project installation procedure and abnormal record

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.