From 1df14f7cb4e0c5d2998c1b4fdd5a2a521c174ec7 Mon Sep 17 00:00:00 2001 From: prozacUa Date: Fri, 6 Jun 2014 17:37:45 +0300 Subject: [PATCH 1/7] start --- docs/guide-ru/intro-yii.md | 58 +++++++++ docs/guide-ru/start-installation.md | 190 ++++++++++++++++++++++++++++ 2 files changed, 248 insertions(+) create mode 100644 docs/guide-ru/intro-yii.md create mode 100644 docs/guide-ru/start-installation.md diff --git a/docs/guide-ru/intro-yii.md b/docs/guide-ru/intro-yii.md new file mode 100644 index 0000000000..41c1e4aa15 --- /dev/null +++ b/docs/guide-ru/intro-yii.md @@ -0,0 +1,58 @@ +What is Yii +=========== + +Yii is a high performance, component-based PHP framework for rapidly developing modern Web applications. +The name Yii (pronounced `Yee` or `[ji:]`) means "simple and evolutionary" in Chinese. It can also +be thought of as an acronym for **Yes It Is**! + + +What is Yii Best for? +--------------------- + +Yii is a generic Web programming framework, meaning that it can be used for developing all kinds +of Web applications based on PHP. Because of its component-based architecture and sophisticated caching +support, it is especially suitable for developing large-scale applications such as portals, forums, content +management systems (CMS), e-commerce projects, RESTful Web services, and so on. + + +How does Yii Compare with Other Frameworks? +------------------------------------------- + +- Like most PHP frameworks, Yii implements the MVC (Model-View-Controller) design pattern and promotes code + organization based on this pattern. +- Yii takes the philosophy that code should be written in a simple yet elegant way. It will never try to + over-design things mainly for the purpose of following some design pattern. +- Yii is a full-stack framework providing many proven and ready-to-use features, such as: query builders + and ActiveRecord, for both relational and NoSQL databases; RESTful API development support; multi-tier + caching support; and more. +- Yii is extremely extensible. You can customize or replace nearly every piece of core code. You can also + take advantage of its solid extension architecture, to use or develop redistributable extensions. +- High performance is always a primary goal of Yii. + +Yii is not a one-man show, it is backed up by a [strong core developer team][] as well as a large community +with many professionals constantly contributing to the development of Yii. The Yii developer team +keeps a close eye on the latest trends of Web development, and on the best practices and features +found in other frameworks and projects. The most relevant best practices and features found elsewhere are regularly incorporated into the core framework and exposed +via simple and elegant interfaces. + +[strong core developer team]: http://www.yiiframework.com/about/ + +Yii Versions +------------ + +Yii currently has two major versions available: 1.1 and 2.0. Version 1.1 is the old generation and is now in maintenance mode. Version 2.0 is a complete rewrite of Yii, adopting the latest +technologies and protocols, including Composer, PSR, namespaces, traits, and so forth. Version 2.0 represents the latest +generation of the framework and will receive our main development efforts in the next few years. +This guide is mainly about version 2.0. + + +Requirements and Prerequisites +------------------------------ + +Yii 2.0 requires PHP 5.4.0 or above. You can find more detailed requirements for individual features +by running the requirement checker included in every Yii release. + +Using Yii requires basic knowledge about object-oriented programming (OOP), as Yii is a pure OOP-based framework. +Yii 2.0 also makes use of the latest features of PHP, such as [namespaces](http://www.php.net/manual/en/language.namespaces.php) and [traits](http://www.php.net/manual/en/language.oop5.traits.php). Understanding these concepts will help +you more easily pick up Yii 2.0. + diff --git a/docs/guide-ru/start-installation.md b/docs/guide-ru/start-installation.md new file mode 100644 index 0000000000..4492c980c2 --- /dev/null +++ b/docs/guide-ru/start-installation.md @@ -0,0 +1,190 @@ +Installing Yii +============== + +You can install Yii in two ways, using [Composer](http://getcomposer.org/) or downloading an archive file. +The former is the preferred way as it allows you to install new [extensions](structure-extensions.md) +or update Yii by running a single command. + + +Installing via Composer +----------------------- + +If you do not already have Composer installed, you may get it by following the instructions at +[getcomposer.org](https://getcomposer.org/download/), or simply + +* on Linux or Mac, run the following commands: + + ``` + curl -s http://getcomposer.org/installer | php + mv composer.phar /usr/local/bin/composer + ``` +* on Windows, download and run [Composer-Setup.exe](https://getcomposer.org/Composer-Setup.exe). + +Please refer to the [Composer Documentation](https://getcomposer.org/doc/) if you encounter any +problems or want to learn more about the Composer usage. + +With Composer installed, you can install Yii by running the following command under a Web accessible folder: + +``` +composer create-project --prefer-dist yiisoft/yii2-app-basic basic +``` + +The above command installs Yii as a directory named `basic`. + +> Tip: If you want to install the latest development version of Yii, you may use the following command +which adds a `stability` option: +``` +composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic basic +``` +Note that the development version of Yii should not be used for production as it may break your running code. + + +Installing from an Archive File +------------------------------- + +Installing Yii from an archive file involves two steps: + +1. Download the archive file from [yiiframework.com](http://www.yiiframework.com/download/yii2-basic); +2. Unpack the downloaded file to a Web accessible folder. + + +Other Installation Options +-------------------------- + +The above installation instructions show how to install Yii in terms of a basic Web application that works out of box. +It is a good start for small projects or if you just start learning Yii. + +There are other installation options available: + +* If you only want to install the core framework and would like to build an application from scratch, + you may follow the instructions as explained in [Building Application from Scratch](tutorial-start-from-scratch.md). +* If you want to start with a more sophisticated application that supports team development environment, + you may consider [Advanced Application Template](tutorial-advanced-app.md). + + +Verifying Installation +---------------------- + +After installation, you can use your browser to access the installed Yii application with the following URL, +assuming you have installed Yii in a directory named `basic` that is under the document root of your Web server +and the server name is `hostname`, + +``` +http://hostname/basic/web/index.php +``` + +![Successful Installation of Yii](images/start-app-installed.png) + +You should see the above "Congratulations!" page in your browser. If not, please check if your PHP installation satisfies +Yii's requirements by using one of the following approaches: + +* Use a browser to access the URL `http://hostname/basic/requirements.php` +* Run the following commands: + + ``` + cd basic + php requirements.php + ``` + +You should configure your PHP installation so that it meets the minimum requirement of Yii. +In general, you should have PHP 5.4 or above. And you should install +the [PDO PHP Extension](http://www.php.net/manual/en/pdo.installation.php) and a corresponding database driver +(such as `pdo_mysql` for MySQL databases), if your application needs a database. + + +Configuring Web Servers +----------------------- + +> Info: You may skip this sub-section for now if you are just testing driving Yii with no intention + of deploying it to a production server. + +The application installed according to the above instructions should work out of box with either +an [Apache HTTP server](http://httpd.apache.org/) or an [Nginx HTTP server](http://nginx.org/), on +either Windows or Linux. + +On a production server, you may want to configure your Web server so that the application can be accessed +via the URL `http://hostname/index.php` instead of `http://hostname/basic/web/index.php`. This +requires pointing the document root of your Web server to the `basic/web` folder. And you may also +want to hide `index.php` from the URL, as described in the [URL Parsing and Generation](runtime-url-handling.md) section. +In this subsection, we will show how to configure your Apache or Nginx server to achieve these goals. + +> Info: By setting `basic/web` as the document root, you also prevent end users from accessing +your private application code and sensitive data files that are stored in the sibling directories +of `basic/web`. This makes your application more secure. + +> Info: If your application will run in a shared hosting environment where you do not have the permission +to modify its Web server setting, you may adjust the structure of your application. Please refer to +the [Shared Hosting Environment](tutorial-shared-hosting.md) section for more details. + + +### Recommended Apache Configuration + +Use the following configuration in Apache's `httpd.conf` file or within a virtual host configuration. Note that you +should replace `path/to/basic/web` with the actual path of `basic/web`. + +``` +# Set document root to be "basic/web" +DocumentRoot "path/to/basic/web" + + + RewriteEngine on + + # If a directory or a file exists, use the request directly + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + # Otherwise forward the request to index.php + RewriteRule . index.php + + # ...other settings... + +``` + + +### Recommended Nginx Configuration + +You should have installed PHP as an [FPM SAPI](http://php.net/install.fpm) for [Nginx](http://wiki.nginx.org/). +Use the following Nginx configuration and replace `path/to/basic/web` with the actual path of `basic/web`. + +``` +server { + charset utf-8; + client_max_body_size 128M; + + listen 80; ## listen for ipv4 + #listen [::]:80 default_server ipv6only=on; ## listen for ipv6 + + server_name mysite.local; + root /path/to/basic/web; + index index.php; + + access_log /path/to/project/log/access.log main; + error_log /path/to/project/log/error.log; + + location / { + # Redirect everything that isn't a real file to index.php + try_files $uri $uri/ /index.php?$args; + } + + # uncomment to avoid processing of calls to non-existing static files by Yii + #location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ { + # try_files $uri =404; + #} + #error_page 404 /404.html; + + location ~ \.php$ { + include fastcgi.conf; + fastcgi_pass 127.0.0.1:9000; + #fastcgi_pass unix:/var/run/php5-fpm.sock; + } + + location ~ /\.(ht|svn|git) { + deny all; + } +} +``` + +When using this configuration, you should set `cgi.fix_pathinfo=0` in the `php.ini` file +in order to avoid many unnecessary system `stat()` calls. + +Also note that when running an HTTPS server you need to add `fastcgi_param HTTPS on;` so that Yii +can properly detect if a connection is secure. From 9f34c35439289af7fe19903c12294e7a4e2f3110 Mon Sep 17 00:00:00 2001 From: prozacUa Date: Fri, 6 Jun 2014 18:00:52 +0300 Subject: [PATCH 2/7] Update intro-yii.md --- docs/guide-ru/intro-yii.md | 51 ++++++++++++-------------------------- 1 file changed, 16 insertions(+), 35 deletions(-) diff --git a/docs/guide-ru/intro-yii.md b/docs/guide-ru/intro-yii.md index 41c1e4aa15..5c4dbb378f 100644 --- a/docs/guide-ru/intro-yii.md +++ b/docs/guide-ru/intro-yii.md @@ -1,58 +1,39 @@ -What is Yii +Что такое Yii? =========== -Yii is a high performance, component-based PHP framework for rapidly developing modern Web applications. -The name Yii (pronounced `Yee` or `[ji:]`) means "simple and evolutionary" in Chinese. It can also -be thought of as an acronym for **Yes It Is**! +Yii – это высокопроизводительный компонентный PHP фреймворк предназначенный для быстрой разработки современных Web приложений. Слово Yii (произносится `Йи` `[ji:]`) в китайском языке означает «простой и развивающийся». Так же, Yii расшифровывается как акроним **Yes It Is**! -What is Yii Best for? +Для каких задач Yii больше всего подходит? --------------------- -Yii is a generic Web programming framework, meaning that it can be used for developing all kinds -of Web applications based on PHP. Because of its component-based architecture and sophisticated caching -support, it is especially suitable for developing large-scale applications such as portals, forums, content -management systems (CMS), e-commerce projects, RESTful Web services, and so on. +Yii – это универсальный фреймворк для Web разработки и может быть задействован во всех типах Web приложений. Благодаря его модульной структуре и мощной поддержке кеширования Yii особенно подходит для разработки таких крупных проектов как порталы, форумы, CMS, сервисы электронной коммерции, RESTful-приложения и т.п. -How does Yii Compare with Other Frameworks? +Сравнение Yii с другими фреймворками ------------------------------------------- -- Like most PHP frameworks, Yii implements the MVC (Model-View-Controller) design pattern and promotes code - organization based on this pattern. -- Yii takes the philosophy that code should be written in a simple yet elegant way. It will never try to - over-design things mainly for the purpose of following some design pattern. -- Yii is a full-stack framework providing many proven and ready-to-use features, such as: query builders - and ActiveRecord, for both relational and NoSQL databases; RESTful API development support; multi-tier - caching support; and more. -- Yii is extremely extensible. You can customize or replace nearly every piece of core code. You can also - take advantage of its solid extension architecture, to use or develop redistributable extensions. -- High performance is always a primary goal of Yii. +- Как и многие другие PHP фреймворки, в Yii реализована модель MVC (Model-View-Controller). Предполагается, что Ваш код будет организован в соответствии с этой моделью. +- Yii придерживается философии простого и элегантного кода не пытаясь усложнять дизайн только ради того, что бы следовать каким-либо принципам проектирования. +- Yii представляет собой full-stack фреймворк включая такой проверенный и готовый к использованию функционал, как ActiveRecord для реляционных и NoSQL баз данных, поддержка разработки RESTful API, многоуровневое кеширование и т.д. +- Yii черезвычайно масштабируем. Вы можете настраивать и изменять практически любую часть основного кода. Используйте преимущества модульной архитектуры применяя существующие или разрабатывая свои собственные расширения. +- Одна из главных целей Yii – производительность. -Yii is not a one-man show, it is backed up by a [strong core developer team][] as well as a large community -with many professionals constantly contributing to the development of Yii. The Yii developer team -keeps a close eye on the latest trends of Web development, and on the best practices and features -found in other frameworks and projects. The most relevant best practices and features found elsewhere are regularly incorporated into the core framework and exposed -via simple and elegant interfaces. +Yii — не проект одного человека. Он поддерживается и развивается силами [небольшой команды][] и довольно большим сообществом разработчиков, которые им помогают. Разработчики фреймворка следят за тенденциями веб разработки и развитием других проектов. Наиболее интересные возможности и лучшие практики регулярно внедряются в фреймворк в виде простых и элегантных интерфейсов. -[strong core developer team]: http://www.yiiframework.com/about/ +[небольшой команды]: http://www.yiiframework.com/about/ -Yii Versions +Версии Yii ------------ -Yii currently has two major versions available: 1.1 and 2.0. Version 1.1 is the old generation and is now in maintenance mode. Version 2.0 is a complete rewrite of Yii, adopting the latest -technologies and protocols, including Composer, PSR, namespaces, traits, and so forth. Version 2.0 represents the latest -generation of the framework and will receive our main development efforts in the next few years. -This guide is mainly about version 2.0. +На данный момент существует две основные ветки Yii: 1.1 и 2.0. Версия 1.1 является предыдущим поколением и находится в поддерживаемом состоянии. Версия 2.0 – это полностью переписанный Yii адоптированный к таким последним технологиям и протоколам как Composer, PSR, пространство имен, типажи (traits) и многие другие. Версия 2.0 представляет собой последнее поколение фреймворка и на ней будут сосредоточены основные усилия разработчиков несколько следующих лет. Данное руководство именно о версии 2.0. -Requirements and Prerequisites +Требования и предпосылки ------------------------------ Yii 2.0 requires PHP 5.4.0 or above. You can find more detailed requirements for individual features by running the requirement checker included in every Yii release. -Using Yii requires basic knowledge about object-oriented programming (OOP), as Yii is a pure OOP-based framework. -Yii 2.0 also makes use of the latest features of PHP, such as [namespaces](http://www.php.net/manual/en/language.namespaces.php) and [traits](http://www.php.net/manual/en/language.oop5.traits.php). Understanding these concepts will help -you more easily pick up Yii 2.0. +Для работы Yii 2.0 необходим PHP 5.4.0 и выше. Детальные требования покажет и проверит соответствующий скрипт, который включен в Yii. Для использования Yii требуются базовые знания Объектно-Ориентированного программирования, т.к. Yii основан на ООП. Yii 2.0 так же использует такой новый функционал PHP как [пространство имен](http://www.php.net/manual/en/language.namespaces.php) и [типажи](http://www.php.net/manual/en/language.oop5.traits.php). Понимание этих концепций поможет быстрее разобраться в Yii 2.0. From 9ebda9f837f3d77d916b467a9214bb4f421457a4 Mon Sep 17 00:00:00 2001 From: prozacUa Date: Fri, 6 Jun 2014 18:38:35 +0300 Subject: [PATCH 3/7] =?UTF-8?q?=D0=BF=D0=BE=D0=BB=D0=BE=D0=B2=D0=B8=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=B3=D0=BE=D1=82=D0=BE=D0=B2=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/guide-ru/start-installation.md | 52 +++++++++++++---------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/docs/guide-ru/start-installation.md b/docs/guide-ru/start-installation.md index 4492c980c2..452dc8eb1b 100644 --- a/docs/guide-ru/start-installation.md +++ b/docs/guide-ru/start-installation.md @@ -1,65 +1,61 @@ -Installing Yii +Установка Yii ============== -You can install Yii in two ways, using [Composer](http://getcomposer.org/) or downloading an archive file. -The former is the preferred way as it allows you to install new [extensions](structure-extensions.md) -or update Yii by running a single command. +Вы можете установить Yii двумя способами: используя [Composer](http://getcomposer.org/) или скачав архив. +Первый способ предпочтительнее т.к. позволяет установить установить новые [расширения](structure-extensions.md) +или обновить Yii одной командой. -Installing via Composer +Установка при помощи Composer ----------------------- -If you do not already have Composer installed, you may get it by following the instructions at -[getcomposer.org](https://getcomposer.org/download/), or simply +Если Composer еще не установлен это просто сделать по инструкции на +[getcomposer.org](https://getcomposer.org/download/), или одним из нижеперечисленных способов: -* on Linux or Mac, run the following commands: +* на Linux или Mac, используйте следующую команду: ``` curl -s http://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer ``` -* on Windows, download and run [Composer-Setup.exe](https://getcomposer.org/Composer-Setup.exe). +* на Windows, скачайте и запустите [Composer-Setup.exe](https://getcomposer.org/Composer-Setup.exe). -Please refer to the [Composer Documentation](https://getcomposer.org/doc/) if you encounter any -problems or want to learn more about the Composer usage. +Вы можете обращаться к документации [Composer Documentation](https://getcomposer.org/doc/) в случае возникновения проблем или если будет необходима более детальная информация. -With Composer installed, you can install Yii by running the following command under a Web accessible folder: +После установки Composer можно устанавливать Yii. Запуститие команду : ``` composer create-project --prefer-dist yiisoft/yii2-app-basic basic ``` -The above command installs Yii as a directory named `basic`. +в папке доступной через Web. Composer установит Yii (шаблонное приложение basic) в папку `basic`. -> Tip: If you want to install the latest development version of Yii, you may use the following command -which adds a `stability` option: +> Совет: Если хотите установить последнюю (экспериментальную) версию Yii, Вы можете добавить ключ `stability`: ``` composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic basic ``` -Note that the development version of Yii should not be used for production as it may break your running code. +Обратите внимание: не используйте экспериментальную версию Yii в продакшн т.к. данный релиз не стабилен. -Installing from an Archive File +Установка из архива ------------------------------- -Installing Yii from an archive file involves two steps: +Установка Yii из архива состоит из двух шагов: -1. Download the archive file from [yiiframework.com](http://www.yiiframework.com/download/yii2-basic); -2. Unpack the downloaded file to a Web accessible folder. +1. Скачайте архив по адресу [yiiframework.com](http://www.yiiframework.com/download/yii2-basic); +2. Распакуйте скачанный архив в папку, доступную из Web. -Other Installation Options +Другие опции установки -------------------------- -The above installation instructions show how to install Yii in terms of a basic Web application that works out of box. -It is a good start for small projects or if you just start learning Yii. +Нижеприведенные инструкции покажут как установить Yii в виде базового приложения готового к работе. +Это отличный вариант для небольших проектов или для тех, кто только начинает изучать Yii. -There are other installation options available: +Есть два основных варианта такой установки: -* If you only want to install the core framework and would like to build an application from scratch, - you may follow the instructions as explained in [Building Application from Scratch](tutorial-start-from-scratch.md). -* If you want to start with a more sophisticated application that supports team development environment, - you may consider [Advanced Application Template](tutorial-advanced-app.md). +* Если Вам нужен только сам фреймворк и Вы хотели бы создать приложение "с чистого листа" воспользуйтесь инструкцией [простой шаблон приложения](tutorial-start-from-scratch.md). +* Если хотите начать с более продвинутого приложения которое поддерживает командную среду разработки и разделено на несколько слоев (frontend/backend) [продвинутый шаблон приложения](tutorial-advanced-app.md). Verifying Installation From d690711ea21eda21f9ce58396de92e15cee167a3 Mon Sep 17 00:00:00 2001 From: prozacUa Date: Fri, 6 Jun 2014 18:48:42 +0300 Subject: [PATCH 4/7] Update intro-yii.md --- docs/guide-ru/intro-yii.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/guide-ru/intro-yii.md b/docs/guide-ru/intro-yii.md index 5c4dbb378f..b9478fd41a 100644 --- a/docs/guide-ru/intro-yii.md +++ b/docs/guide-ru/intro-yii.md @@ -13,10 +13,10 @@ Yii – это универсальный фреймворк для Web разр Сравнение Yii с другими фреймворками ------------------------------------------- -- Как и многие другие PHP фреймворки, в Yii реализована модель MVC (Model-View-Controller). Предполагается, что Ваш код будет организован в соответствии с этой моделью. -- Yii придерживается философии простого и элегантного кода не пытаясь усложнять дизайн только ради того, что бы следовать каким-либо принципам проектирования. -- Yii представляет собой full-stack фреймворк включая такой проверенный и готовый к использованию функционал, как ActiveRecord для реляционных и NoSQL баз данных, поддержка разработки RESTful API, многоуровневое кеширование и т.д. -- Yii черезвычайно масштабируем. Вы можете настраивать и изменять практически любую часть основного кода. Используйте преимущества модульной архитектуры применяя существующие или разрабатывая свои собственные расширения. +- Как и многие другие PHP фреймворки, в Yii реализована модель MVC (Model-View-Controller). Предполагается, что Ваш код будет организован в соответствии с этой моделью. +- Yii придерживается философии простого и элегантного кода не пытаясь усложнять дизайн только ради того, что бы следовать каким-либо принципам проектирования. +- Yii представляет собой full-stack фреймворк включая такой проверенный и готовый к использованию функционал, как ActiveRecord для реляционных и NoSQL баз данных, поддержка разработки RESTful API, многоуровневое кеширование и т.д. +- Yii черезвычайно масштабируем. Вы можете настраивать и изменять практически любую часть основного кода. Используйте преимущества модульной архитектуры применяя существующие или разрабатывая свои собственные расширения. - Одна из главных целей Yii – производительность. Yii — не проект одного человека. Он поддерживается и развивается силами [небольшой команды][] и довольно большим сообществом разработчиков, которые им помогают. Разработчики фреймворка следят за тенденциями веб разработки и развитием других проектов. Наиболее интересные возможности и лучшие практики регулярно внедряются в фреймворк в виде простых и элегантных интерфейсов. From 3e893181ea2cff3a88e5fe9ce8202e30d4d3b166 Mon Sep 17 00:00:00 2001 From: prozacUa Date: Sat, 7 Jun 2014 11:59:05 +0300 Subject: [PATCH 5/7] Update start-installation.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Остался последний раздел --- docs/guide-ru/start-installation.md | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/docs/guide-ru/start-installation.md b/docs/guide-ru/start-installation.md index 452dc8eb1b..b90112906e 100644 --- a/docs/guide-ru/start-installation.md +++ b/docs/guide-ru/start-installation.md @@ -49,7 +49,7 @@ composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic bas Другие опции установки -------------------------- -Нижеприведенные инструкции покажут как установить Yii в виде базового приложения готового к работе. +Ниже приведены инструкции, которые покажут как установить Yii в виде базового приложения готового к работе. Это отличный вариант для небольших проектов или для тех, кто только начинает изучать Yii. Есть два основных варианта такой установки: @@ -58,12 +58,10 @@ composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic bas * Если хотите начать с более продвинутого приложения которое поддерживает командную среду разработки и разделено на несколько слоев (frontend/backend) [продвинутый шаблон приложения](tutorial-advanced-app.md). -Verifying Installation +Проверка установки ---------------------- -After installation, you can use your browser to access the installed Yii application with the following URL, -assuming you have installed Yii in a directory named `basic` that is under the document root of your Web server -and the server name is `hostname`, +После установки приложения можно зайти браузером на сервер, где происходила установка Yii приложения. Если Вы, по примеру выше, развернули приложение в директории `basic` в корне (DocumentRoot) вашего Web сервера, то URL доступа к точке входа в приложение будет следующим: ``` http://hostname/basic/web/index.php @@ -71,28 +69,25 @@ http://hostname/basic/web/index.php ![Successful Installation of Yii](images/start-app-installed.png) -You should see the above "Congratulations!" page in your browser. If not, please check if your PHP installation satisfies -Yii's requirements by using one of the following approaches: +В результате, Вы должны увидеть страницу приветствия "Congratulations!". Если нет - проверьте в первую очередь требования и зависимости Yii одним из способов: -* Use a browser to access the URL `http://hostname/basic/requirements.php` -* Run the following commands: +* Браузером перейдите по адресу `http://hostname/basic/requirements.php` +* Или выполните команду в консоли: ``` cd basic php requirements.php ``` -You should configure your PHP installation so that it meets the minimum requirement of Yii. -In general, you should have PHP 5.4 or above. And you should install -the [PDO PHP Extension](http://www.php.net/manual/en/pdo.installation.php) and a corresponding database driver -(such as `pdo_mysql` for MySQL databases), if your application needs a database. +Для корректной работы фреймворка Вам нужно настроить PHP в соответствии с требованиями Yii приведенными в этом скрипте. +Самое важное - PHP версии 5.4 и выше. Так же, необходимо установить [PDO PHP Extension](http://www.php.net/manual/en/pdo.installation.php) и соответствующий драйвер +(Например, `pdo_mysql` для MySQL), если Вы планируете использовать базы данных в своем приложении. -Configuring Web Servers +Настройка Web сервера ----------------------- -> Info: You may skip this sub-section for now if you are just testing driving Yii with no intention - of deploying it to a production server. +> Замечание: можете пропустить этот подраздел если Вы лишь тестируете приложение и не разворачиваете его на продакшн сервере. The application installed according to the above instructions should work out of box with either an [Apache HTTP server](http://httpd.apache.org/) or an [Nginx HTTP server](http://nginx.org/), on From eb03545d73b46a58454b61ab08ce5e864b87dc29 Mon Sep 17 00:00:00 2001 From: prozacUa Date: Sat, 7 Jun 2014 13:29:34 +0300 Subject: [PATCH 6/7] Update start-installation.md Translated --- docs/guide-ru/start-installation.md | 48 +++++++++++------------------ 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/docs/guide-ru/start-installation.md b/docs/guide-ru/start-installation.md index b90112906e..d42c1dd32f 100644 --- a/docs/guide-ru/start-installation.md +++ b/docs/guide-ru/start-installation.md @@ -89,52 +89,42 @@ http://hostname/basic/web/index.php > Замечание: можете пропустить этот подраздел если Вы лишь тестируете приложение и не разворачиваете его на продакшн сервере. -The application installed according to the above instructions should work out of box with either -an [Apache HTTP server](http://httpd.apache.org/) or an [Nginx HTTP server](http://nginx.org/), on -either Windows or Linux. +Приложение, установленное по инструкциям данного раздела находится в рабочем состоянии сразу же после установки как с Web сервером [Apache](http://httpd.apache.org/), так и с [Nginx HTTP server](http://nginx.org/), как в окружении Windows, так и в Linux. -On a production server, you may want to configure your Web server so that the application can be accessed -via the URL `http://hostname/index.php` instead of `http://hostname/basic/web/index.php`. This -requires pointing the document root of your Web server to the `basic/web` folder. And you may also -want to hide `index.php` from the URL, as described in the [URL Parsing and Generation](runtime-url-handling.md) section. -In this subsection, we will show how to configure your Apache or Nginx server to achieve these goals. +На рабочем сервере Вам наверняка захочется изменить URL путь к приложению на более удобный, такой как `http://hostname/index.php` вместо `http://hostname/basic/web/index.php`. Для этого лишь нужно изменить корневую директорию в настройках Web сервера так, что бы та указывала на `basic/web`. Так же, можно спрятать `index.php` из URL строки, подробности описаны в разделе [Разбор и генерация URL](runtime-url-handling.md). +В данном подразделе мы увидим как настроить Apache и Nginx соответствующим образом. -> Info: By setting `basic/web` as the document root, you also prevent end users from accessing -your private application code and sensitive data files that are stored in the sibling directories -of `basic/web`. This makes your application more secure. +> Замечание: Устанавливая `basic/web` корневой директорией Web сервера Вы защищаете от нежелательного доступа через Web программную часть приложения и данные, находящиеся на одном уровне с `basic/web`. Такие настройки делают Ваш сервер более защищенным. -> Info: If your application will run in a shared hosting environment where you do not have the permission -to modify its Web server setting, you may adjust the structure of your application. Please refer to -the [Shared Hosting Environment](tutorial-shared-hosting.md) section for more details. +> Замечание: Если Вы работаете на хостинге где нет доступа к настройкам Web сервера, то можно настроить под себя структуру приложения как это описано в разделе [Работа на Shared хостинге](tutorial-shared-hosting.md). -### Recommended Apache Configuration +### Рекомендуемые настройки Apache -Use the following configuration in Apache's `httpd.conf` file or within a virtual host configuration. Note that you -should replace `path/to/basic/web` with the actual path of `basic/web`. +Добавьте следующую конфигурацию в `httpd.conf` Web сервера Apache или в конфигурационный файл виртуального сервера. Не забудьте заменить `path/to/basic/web` на свой корректный путь к `basic/web`. ``` -# Set document root to be "basic/web" +# Устанавливаем корневой директорией "basic/web" DocumentRoot "path/to/basic/web" RewriteEngine on - # If a directory or a file exists, use the request directly + # Если запрашиваемая в URL директория или файл сущесвуют обращаемся к ним напрямую RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d - # Otherwise forward the request to index.php + # Если нет - перенаправляем запрос на index.php RewriteRule . index.php - # ...other settings... + # ...прочие настройки... ``` -### Recommended Nginx Configuration +### Рекомендуемые параметры для Nginx -You should have installed PHP as an [FPM SAPI](http://php.net/install.fpm) for [Nginx](http://wiki.nginx.org/). -Use the following Nginx configuration and replace `path/to/basic/web` with the actual path of `basic/web`. +PHP должен быть установлен как [FPM SAPI](http://php.net/install.fpm) для [Nginx](http://wiki.nginx.org/). +Используйте следующие параметры Nginx и не забудьте заменить `path/to/basic/web` на свой корректный путь к `basic/web`. ``` server { @@ -152,11 +142,11 @@ server { error_log /path/to/project/log/error.log; location / { - # Redirect everything that isn't a real file to index.php + # Перенаправляем все запросы к несуществующим директориям и файлам к index.php try_files $uri $uri/ /index.php?$args; } - # uncomment to avoid processing of calls to non-existing static files by Yii + # раскомментируйте строки ниже во избежание обработки Yii обращений к несуществующим статическим файлам #location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ { # try_files $uri =404; #} @@ -174,8 +164,6 @@ server { } ``` -When using this configuration, you should set `cgi.fix_pathinfo=0` in the `php.ini` file -in order to avoid many unnecessary system `stat()` calls. +Используя данную конфигурацию установите параметр `cgi.fix_pathinfo=0` в `php.ini` что бы предотвратить лишние системные вызовы `stat()`. -Also note that when running an HTTPS server you need to add `fastcgi_param HTTPS on;` so that Yii -can properly detect if a connection is secure. +Учтите что используя HTTPS необходимо задавать `fastcgi_param HTTPS on;` что бы Yii мог корректно определять защищенное соединение. From cbd1db5f8ceb8dfb409c863a5d3c7be4fae2aeb8 Mon Sep 17 00:00:00 2001 From: prozacUa Date: Sat, 7 Jun 2014 13:48:28 +0300 Subject: [PATCH 7/7] Update start-installation.md Translated and orpho fixed. --- docs/guide-ru/start-installation.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/guide-ru/start-installation.md b/docs/guide-ru/start-installation.md index d42c1dd32f..74690c3996 100644 --- a/docs/guide-ru/start-installation.md +++ b/docs/guide-ru/start-installation.md @@ -1,8 +1,8 @@ Установка Yii ============== -Вы можете установить Yii двумя способами: используя [Composer](http://getcomposer.org/) или скачав архив. -Первый способ предпочтительнее т.к. позволяет установить установить новые [расширения](structure-extensions.md) +Вы можете установить Yii двумя способами: используя [Composer](http://getcomposer.org/) или скачав архив с фреймворком. +Первый способ предпочтительнее т.к. позволяет установить новые [расширения](structure-extensions.md) или обновить Yii одной командой. @@ -34,7 +34,7 @@ composer create-project --prefer-dist yiisoft/yii2-app-basic basic ``` composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic basic ``` -Обратите внимание: не используйте экспериментальную версию Yii в продакшн т.к. данный релиз не стабилен. +Обратите внимание: не используйте экспериментальную версию Yii в продакшн т.к. данный релиз не гарантирует стабильной работы. Установка из архива @@ -55,7 +55,7 @@ composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic bas Есть два основных варианта такой установки: * Если Вам нужен только сам фреймворк и Вы хотели бы создать приложение "с чистого листа" воспользуйтесь инструкцией [простой шаблон приложения](tutorial-start-from-scratch.md). -* Если хотите начать с более продвинутого приложения которое поддерживает командную среду разработки и разделено на несколько слоев (frontend/backend) [продвинутый шаблон приложения](tutorial-advanced-app.md). +* Если хотите начать с более продвинутого приложения которое поддерживает командную среду разработки и разделено на несколько слоев (frontend/backend) используйте [продвинутый шаблон приложения](tutorial-advanced-app.md). Проверка установки @@ -166,4 +166,4 @@ server { Используя данную конфигурацию установите параметр `cgi.fix_pathinfo=0` в `php.ini` что бы предотвратить лишние системные вызовы `stat()`. -Учтите что используя HTTPS необходимо задавать `fastcgi_param HTTPS on;` что бы Yii мог корректно определять защищенное соединение. +Учтите, что используя HTTPS необходимо задавать `fastcgi_param HTTPS on;` что бы Yii мог корректно определять защищенное соединение.