[1, yii2 installation process]
Installation with composer, please refer to other blogs for installation of composer
1, download yii2 advanced template
Like ordinary templates, you can download it via composer and github, but the official recommendation uses Composer to install YII. This is more convenient for later maintenance. If you need to add a new extension or upgrade YII, it is completed by the command operation.
⑴ download code C: \> Composer Self-Update
C:\> composer global require “fxp/composer-asset-plugin:~1.1.1” C:\> cd /d D:\phpStudy\WWW\testyii2
D:\wamp\www> composer create-project –prefer-dist yiisoft/yii2-app-advanced testyii2
i download through git
https://github.com/yiisoft/yii2-app-advanced
2, install YII2 advanced template
initialization [Method 1]
⑴ Switch to the directory of the website
C:\Users\Administrator> cd /d D:\phpStudy\WWW\testyii2
⑵ Using PHP script initialization init d: \ phpstudy \ www \ testyii2> d: \ phpstudy \ bin \ php5.5.12 \ php.exe initita
[0] Development development environment
[1] Production to generate environment
⑶ Select the required environment 0 or 1 to start generating, enter yes, and the birth will be opened
The
command execution is over.
Initialization [Method 2]
or direct input:
init
initialization
above two types are fine
3. Configure database
in D: \ PHPSTUDY \ www \ testyii2 \ Common \ config \ main- local.php
[2. The problem encountered in the installation process]
I have installed Composer before, and I have installed YII2. I did n’t understand the process. I was installed successfully according to the online tutorial. This time I installed it with my own influence. The error is as follows
Error reason: There is no time to add github.
Solution: Go to the GitHub website to generate time, and then add it to the composer
Input Composer -V
Display the configuration of the composer icon description.
Reference:
1.Composer problemhttp://www.bubuko.com/infodetail-772621.html
2. Installationhttp://www.cnblogs.com/topshooter/p/yii2_advanced_install.html