Symfony installation and configuration methods

Source: Internet
Author: User
This article mainly introduces Symfony's installation and configuration methods, and analyzes the specific steps and related skills for installing Symfony using Composer, for more information about Symfony installation and configuration, see the following example. We will share this with you for your reference. The details are as follows:

Installing Symfony manually is simple, and there is almost no need to talk about it. Open the http://symfony.com/download, select a Symfony release from the selection list on the page, and then click download now next to it ", decompress the downloaded package to a location on your Web server. the installation is complete. (The most popular version is usually the best. the tgz format or zip format is just a matter of personal preferences. for each version of Symfony, there is also a "without vendor" version, but it is best not to download this version at the beginner stage .)

Install Symfony using Composer

Symfony has a good partner called Composer. let's take a look at how to use Composer to install Symfony.

Get Composer

As mentioned above, Composer is a phar php code package (Php ARchive) that can be executed. it is a cool thing. if you are interested in it, https://getcomposer.org/has more information about Composer.

On * nix, run the following command to automatically install Composer:

curl -sS https://getcomposer.org/installer | php

The installation program of Composer checks the system environment and provides some suggestions for configuration modification. if possible, follow the prompts. After everything is ready, you can use Composer to install Symfony. Run the following command:

php composer.phar create-project symfony/framework-standard-edition /path/to/webroot/Symfony 2.3.1

In the above command,/path/to/webroot/Symfony is the path to which you want Symfony to be installed, and 2.3.1 is the version number. When you see this article, this number is probably not the latest Symfony version, you can go to the http://symfony.com/download page to get the latest version number, and then replace it with it.

Whether you manually install or use Composer, you can view the file structure of the project in the installation directory you selected.

If you are using an Apache Web server and assume that Symfony is located in the Symfony directory under the root directory, you can use the following URL to see the successful installation of Symfony.

Http: // localhost/Symfony/web/app_dev.php

If Nginx is used, more configuration work may be required, which will be further described in subsequent articles.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.