yii 2 установка


https://github.com/yiisoft/yii2/blob/master/docs/guide-ru/start-installation.md
Использовать composer можно из open-server
Правой клавишей мышки по флажку (сервер должен быть запущен)

Ладно, но если у вас есть composer, то установить достаточно просто.
дополнительно -> консоль

для использования под прокси нужно сначала прописать

set http_proxy=http://proxy.ru:port/
set https_proxy=http://proxy.ru:port/
где proxy.ru - название вашего прокси, port - числовое значение порта


Привожу список команд из консоли openserver


Видите - все достаточно просто как и описано здесь (при переходе Ctrl+F и ищите  Composer)

Сначала создаем json для composer

 
D:\webmaster\OpenServer\domains\composer>composer init                         
Warning: This development build of composer is over 30 days old. It is recommen
ed to update it by running "d:\webmaster\openserver\modules\php\PHP-5.4\compose
.phar self-update" to get the latest version.                                  
                                                                               
                                                                               
  Welcome to the Composer config generator                                     
                                                                               
                                                                               
                                                                               
This command will guide you through creating your composer.json config.        
                                                                               
Package name (<vendor>/<name>) [zuev_np/composer]: des/des                     
Description []:                                                                
Author:                                                                        
 Invalid author string.  Must be in the format: John Smith <john@example.com>  
Author: des des <d@m.ru>                                                       
Minimum Stability []:                                                          
License []:                                                                    
                                                                               
Define your dependencies.                                                      
                                                                               
Would you like to define your dependencies (require) interactively [yes]? no   
Would you like to define your dev dependencies (require-dev) interactively [yes
? no                                                                           
                                                                               
{                                                                              
    "name": "des/des",                                                         
    "authors": [                                                               
        {                                                                      
            "name": "des des",                                                 
            "email": "d@m.ru"                                                  
        }                                                                      
    ],                                                                         
    "require": {}                                                              
}                                                                              
                                                                               
Do you confirm generation [yes]?                                               
                                                                               
D:\webmaster\OpenServer\domains\composer>                                      
и получаем в D:\webmaster\OpenServer\domains\composer\composer.json

{
    "name": "des/des",
    "authors": [
        {
            "name": "des des",
            "email": "d@m.ru"
        }
    ],
    "require": {}
}

Затем команды установки
для basic
composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic basic

для advanced
composer create-project --prefer-dist yiisoft/yii2-app-advanced  advanced

advanced правда еще и доустановить надо командой
F:\OpenServer\domains\localhost\composer\advanced>php init


и получим

http://localhost/composer/basic/web/index.php                               basic

http://localhost/composer/advanced/frontend/web/index.php          advanced

внизу ссылка с тем что получилось

загрузка

качаете и запускаете



Комментарии

Популярные сообщения из этого блога

Пишем логи на C# (.NET). Легкий способ.

Удобная разработка Windows Service с TopShelf