1. Download Composer-setup for global installation (use composer self-update command to update composer to the latest version)
2. Command line execution (basic template or Advanced template):
Composer Create-project--prefer-dist Yiisoft/yii2-app-basic basic
Composer Create-project--prefer-dist yiisoft/yii2-app-advanced? Advanced
Install Yii in the directory named basic
, you can also choose any other name??
If you want to install the latest development version of Yii to add the--stability=dev parameter, the command is as follows:
? composer Create-project--prefer-dist--stability=dev yiisoft/yii2-app-basic Basic
Composer Create-project--prefer-dist--stability=dev yiisoft/yii2-app-advanced? Advanced?
Note that the development version of Yii (dev) should not be used in a production environment, it may break code in the running?
3. Execute the command:
Php-s 127.0.0.1:8080-t%dir%/basic/web
(Let the service background run can use the command: php-s 127.0.0.1:8080-t%dir%/basic/web >>/tmp/access.log 2>&1 &),
%dir%/basic/web for your site root directory address, after successful execution, in the browser input? 127.0.0.1:8080 to access (my Php.exe added environment variables, do not join, please enter the PHP installation directory to execute the command)
?? Several link addresses for learning yii2.0
Http://www.yiichina.com/doc/guide/2.0?
http://www.digpage.com/?
http://yii2.techbrood.com/
yii2.0 Composer Installation