Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Simplified the Quick tour explanation about Symfony Installation#5497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
javiereguiluz wants to merge1 commit intosymfony:2.7fromjaviereguiluz:pr/5482
Closed
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 3 additions & 108 deletionsquick_tour/the_big_picture.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,119 +8,14 @@ quickly by showing you a simple project in action.
If you've used a web framework before, you should feel right at home with
Symfony. If not, welcome to a whole new way of developing web applications.

The only technical requisite to follow this tutorial is to have **PHP 5.4
or higher installed on your computer**. If you use a packaged PHP solution
such as WAMP, XAMP or MAMP, check out that they are using PHP 5.4 or a more
recent version. You can also execute the following command in your terminal
or command console to display the installed PHP version:

.. code-block:: bash

$ php --version

.. _installing-symfony2:

Installing Symfony
------------------

In the past, Symfony had to be installed manually for each new project.
Now you can use the **Symfony Installer**, which has to be installed the
very first time you use Symfony on a computer.

On **Linux** and **Mac OS X** systems, execute the following console commands:

.. code-block:: bash

$ curl -LsS http://symfony.com/installer > symfony.phar
$ sudo mv symfony.phar /usr/local/bin/symfony
$ chmod a+x /usr/local/bin/symfony

After installing the Symfony installer, you'll have to open a new console
window to be able to execute the new ``symfony`` command:

.. code-block:: bash

$ symfony

On **Windows** systems, execute the following console command:

.. code-block:: bash

c:\> php -r "readfile('http://symfony.com/installer');" > symfony.phar

This command downloads a file called ``symfony.phar`` which contains the
Symfony installer. Save or move that file to the directory where you create
the Symfony projects and then, execute the Symfony installer right away
with this command:

.. code-block:: bash

c:\> php symfony.phar

Creating your First Symfony Project
-----------------------------------

Once the Symfony Installer is set up, use the ``new`` command to create
new Symfony projects. Let's create a new project called ``myproject``:

.. code-block:: bash

# Linux and Mac OS X
$ symfony new myproject

# Windows
c:\> php symfony.phar new myproject

This command downloads the latest Symfony stable version and creates an
empty project in the ``myproject/`` directory so you can start developing
your application right away.

.. _running-symfony2:

Running Symfony
---------------

This tutorial leverages the internal web server provided by PHP to run Symfony
applications. Therefore, running a Symfony application is a matter of browsing
the project directory and executing this command:

.. code-block:: bash

$ cd myproject/
$ php app/console server:run

Open your browser and access the ``http://localhost:8000/app/example`` URL to see the
welcome page of Symfony:

.. image:: /images/quick_tour/welcome.png
:align: center
:alt: Symfony Welcome Page

Congratulations! Your first Symfony project is up and running!

.. note::

Instead of the welcome page, you may see a blank page or an error page.
This is caused by a directory permission misconfiguration. There are
several possible solutions depending on your operating system. All of
them are explained in the
:ref:`Setting up Permissions <book-installation-permissions>` section
of the official book.

If the welcome page does not seem to be rendering CSS or image assets,
install them first:

.. code-block:: bash

$ php app/console assets:install

When you are finished working on your Symfony application, you can stop
the server by pressing Ctrl and C.

.. tip::

If you prefer a traditional web server such as Apache or Nginx, read
the :doc:`/cookbook/configuration/web_server_configuration` article.
Before continuing reading this chapter, make sure to have installed both PHP
and Symfony as explained in the :doc:`installation chapter </book/installation>`
of the Symfony book.

Understanding the Fundamentals
------------------------------
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp