Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
8b96f51f
Commit
8b96f51f
authored
Jun 10, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edited installation guide
parent
e8657450
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
20 deletions
+18
-20
start-installation.md
docs/guide/start-installation.md
+18
-20
No files found.
docs/guide/start-installation.md
View file @
8b96f51f
...
...
@@ -13,10 +13,9 @@ Installing via Composer <a name="installing-via-composer"></a>
If you do not already have Composer installed, you may do so by following the instructions at
[
getcomposer.org
](
https://getcomposer.org/download/
)
. On Linux and Mac OS X, you'll run the following commands:
```
curl -s http://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
```
On Windows, you'll 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
...
...
@@ -24,18 +23,16 @@ problems or want to learn more about 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
```
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.
> which adds a [stability option](https://getcomposer.org/doc/04-schema.md#minimum-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.
Installing from an Archive File <a name="installing-from-archive-file"></a>
...
...
@@ -50,7 +47,7 @@ Installing Yii from an archive file involves two steps:
Other Installation Options <a name="other-installation-options"></a>
--------------------------
The above installation instructions show how to install Yii, which also creates a basic Web application that works out of box.
The above installation instructions show how to install Yii, which also creates a basic Web application that works out of
the
box.
This approach is a good starting point for small projects, or for when you just start learning Yii.
But there are other installation options available:
...
...
@@ -62,23 +59,23 @@ But there are other installation options available:
Verifying the Installation <a name="verifying-installation"></a>
----------------------
----------------------
----
After installation, you can use your browser to access the installed Yii application with the following URL:
```
http://
hostname
/basic/web/index.php
http://
localhost
/basic/web/index.php
```
(This URL assumes you have installed Yii in a directory named `basic`, directly under the Web server
document root directory,
and that the
server name is `hostname`.)
This URL assumes you have installed Yii in a directory named
`basic`
, directly under the Web server's
document root directory,
and that the
Web server is running on your local machine(
`localhost`
), you may have to adjust it to your installation environment.
![
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. You can check if the minimum requirements are met using one of the following approaches:
* Use a browser to access the URL `http://
hostname
/basic/requirements.php`
*
Use a browser to access the URL
`http://
localhost
/basic/requirements.php`
*
Run the following commands:
```
...
...
@@ -102,7 +99,7 @@ an [Apache HTTP server](http://httpd.apache.org/) or an [Nginx HTTP server](http
Windows, Mac OS X, 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`. Such configuration
via the URL `http://
www.example.com/index.php` instead of `http://www.example.com
/basic/web/index.php`. Such configuration
requires pointing the document root of your Web server to the `basic/web` folder. 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, you'll learn how to configure your Apache or Nginx server to achieve these goals.
...
...
@@ -142,7 +139,8 @@ DocumentRoot "path/to/basic/web"
### Recommended Nginx Configuration <a name="recommended-nginx-configuration"></a>
You should have installed PHP as an [FPM SAPI](http://php.net/install.fpm) to use [Nginx](http://wiki.nginx.org/).
Use the following Nginx configuration, replacing `path/to/basic/web` with the actual path for `basic/web`.
Use the following Nginx configuration, replacing `path/to/basic/web` with the actual path for `basic/web` and `mysite.local` with
the actual hostname to serve.
```
server {
...
...
@@ -156,8 +154,8 @@ server {
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;
access_log /path/to/
basic
/log/access.log main;
error_log /path/to/
basic
/log/error.log;
location / {
# Redirect everything that isn't a real file to index.php
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment