Installing framework Yii2 basic advanced on Linux
Author: Rafal MarguzewiczPublished:
Categories: Yii2
Tags: composer • install • Linux
Install framework Yii2 is very simple, if you have correctly install system to management packages PHP – composer.
Before installation Yii2, have to install one package requires for Yii2
Open terminalCTRL + ALT + T and paste
composer global require "fxp/composer-asset-plugin:^1.2.0"
possibly if you have Composer in another configuration:
php composer.phar global require "fxp/composer-asset-plugin:^1.2.0"
As all and only dependencies have been installed we go for example to the directory from which our Server HTTP get file (e.g. /home/user/localhost/)
Install framework Yii2 with Composer
In the case of install version basic
composer create-project yiisoft/yii2-app-basic name_app 2.0.11
In the case of install version advanced
composer create-project yiisoft/yii2-app-advanced name_app 2.0.11
Install framework Yii2 from pack .tgz or .zip
In this case, easier download version Basic, which after extract does not require any action more.
Yii2 basic .zip
Yii2 basic .tgz i .zip
Configuration server HTTP
Nginx config for Yii2 basic template (with HTTPS/2 and redirect WWW to non-WWW)
Nginx config for Yii2 advanced template