@@ -8,119 +8,14 @@ quickly by showing you a simple project in action.
88If you've used a web framework before, you should feel right at home with
99Symfony. If not, welcome to a whole new way of developing web applications.
1010
11- The only technical requisite to follow this tutorial is to have **PHP 5.4
12- or higher installed on your computer **. If you use a packaged PHP solution
13- such as WAMP, XAMP or MAMP, check out that they are using PHP 5.4 or a more
14- recent version. You can also execute the following command in your terminal
15- or command console to display the installed PHP version:
16-
17- .. code-block :: bash
18-
19- $ php --version
20-
2111.. _installing-symfony2 :
2212
2313Installing Symfony
2414------------------
2515
26- In the past, Symfony had to be installed manually for each new project.
27- Now you can use the **Symfony Installer **, which has to be installed the
28- very first time you use Symfony on a computer.
29-
30- On **Linux ** and **Mac OS X ** systems, execute the following console commands:
31-
32- .. code-block :: bash
33-
34- $ curl -LsS http://symfony.com/installer > symfony.phar
35- $ sudo mv symfony.phar /usr/local/bin/symfony
36- $ chmod a+x /usr/local/bin/symfony
37-
38- After installing the Symfony installer, you'll have to open a new console
39- window to be able to execute the new ``symfony `` command:
40-
41- .. code-block :: bash
42-
43- $ symfony
44-
45- On **Windows ** systems, execute the following console command:
46-
47- .. code-block :: bash
48-
49- c:\> php -r " readfile('http://symfony.com/installer');" > symfony.phar
50-
51- This command downloads a file called ``symfony.phar `` which contains the
52- Symfony installer. Save or move that file to the directory where you create
53- the Symfony projects and then, execute the Symfony installer right away
54- with this command:
55-
56- .. code-block :: bash
57-
58- c:\> php symfony.phar
59-
60- Creating your First Symfony Project
61- -----------------------------------
62-
63- Once the Symfony Installer is set up, use the ``new `` command to create
64- new Symfony projects. Let's create a new project called ``myproject ``:
65-
66- .. code-block :: bash
67-
68- # Linux and Mac OS X
69- $ symfony new myproject
70-
71- # Windows
72- c:\> php symfony.phar new myproject
73-
74- This command downloads the latest Symfony stable version and creates an
75- empty project in the ``myproject/ `` directory so you can start developing
76- your application right away.
77-
78- .. _running-symfony2 :
79-
80- Running Symfony
81- ---------------
82-
83- This tutorial leverages the internal web server provided by PHP to run Symfony
84- applications. Therefore, running a Symfony application is a matter of browsing
85- the project directory and executing this command:
86-
87- .. code-block :: bash
88-
89- $ cd myproject/
90- $ php app/console server:run
91-
92- Open your browser and access the ``http://localhost:8000/app/example `` URL to see the
93- welcome page of Symfony:
94-
95- .. image :: /images/quick_tour/welcome.png
96- :align: center
97- :alt: Symfony Welcome Page
98-
99- Congratulations! Your first Symfony project is up and running!
100-
101- .. note ::
102-
103- Instead of the welcome page, you may see a blank page or an error page.
104- This is caused by a directory permission misconfiguration. There are
105- several possible solutions depending on your operating system. All of
106- them are explained in the
107- :ref: `Setting up Permissions <book-installation-permissions >` section
108- of the official book.
109-
110- If the welcome page does not seem to be rendering CSS or image assets,
111- install them first:
112-
113- .. code-block :: bash
114-
115- $ php app/console assets:install
116-
117- When you are finished working on your Symfony application, you can stop
118- the server by pressing Ctrl and C.
119-
120- .. tip ::
121-
122- If you prefer a traditional web server such as Apache or Nginx, read
123- the :doc: `/cookbook/configuration/web_server_configuration ` article.
16+ Before continuing reading this chapter, make sure to have installed both PHP
17+ and Symfony as explained in the :doc: `installation chapter </book/installation >`
18+ of the Symfony book.
12419
12520Understanding the Fundamentals
12621------------------------------
0 commit comments