官术网_书友最值得收藏!

Installation

There are four ways to install the Symfony framework:

  • Download the archive file in the root of our project and unpack it there
  • Clone the project from GitHub
  • Use the Symfony installer tool
  • Use Composer to install it for us

The easiest way is to download the Symfony installer and make it publicly accessible via the following commands:

$ sudo curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony
$ sudo chmod a+x /usr/local/bin/symfony

Now create a new project simply by running the following command:

$ symfony new mava

As this command shows, it will ask the Symfony installer to create a new folder in the current path called mava, and when you hit enter, you will see that the Symfony source code will be downloaded to that folder:

Installation

Note

If you don't mention a version number or branch name in the installer command, it downloads and installs the latest stable version of Symfony.

In the list of things that we can do after installation is running the application immediately, without installing a virtual host. Thanks to the PHP built-in web server, we can run it via Symfony's console and browse the mava app at port 8000 on localhost:

$ bin/console server:run

The following screenshot shows how http://localhost:8000 looks like in your favourite browser:

Installation

Tip

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  • Log in or register to our website using your e-mail address and password.
  • Hover the mouse pointer on the SUPPORT tab at the top.
  • Click on Code Downloads & Errata.
  • Enter the name of the book in the Search box.
  • Select the book for which you're looking to download the code files.
  • Choose from the drop-down menu where you purchased this book from.
  • Click on Code Download.

You can also download the code files by clicking on the Code Files button on the book's webpage at the Packt Publishing website. This page can be accessed by entering the book's name in the Search box. Please note that you need to be logged in to your Packt account.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows
  • Zipeg / iZip / UnRarX for Mac
  • 7-Zip / PeaZip for Linux
主站蜘蛛池模板: 临颍县| 怀来县| 甘谷县| 新郑市| 岑巩县| 惠东县| 丰宁| 芮城县| 七台河市| 甘泉县| 铅山县| 内黄县| 顺昌县| 当阳市| 新余市| 安达市| 锦州市| 开化县| 长治县| 恭城| 金乡县| 古丈县| 赣榆县| 松桃| 福贡县| 兰考县| 汉阴县| 淮阳县| 苍山县| 乐至县| 凌源市| 蒙城县| 澜沧| 青岛市| 兴宁市| 东宁县| 新龙县| 民乐县| 丰台区| 德江县| 涞水县|