- Mastering Symfony
- Sohail Salehi
- 415字
- 2021-07-16 11:28:56
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:

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:

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
- 程序員面試筆試寶典(第3版)
- Hyper-V 2016 Best Practices
- C++程序設(shè)計(jì)(第3版)
- Microsoft Dynamics 365 Extensions Cookbook
- Java高手真經(jīng)(高級(jí)編程卷):Java Web高級(jí)開(kāi)發(fā)技術(shù)
- Ext JS Data-driven Application Design
- Python程序設(shè)計(jì)(第3版)
- HTML5游戲開(kāi)發(fā)案例教程
- Getting Started with SQL Server 2012 Cube Development
- Redis Essentials
- 軟件架構(gòu):Python語(yǔ)言實(shí)現(xiàn)
- Python完全自學(xué)教程
- 零基礎(chǔ)輕松學(xué)SQL Server 2016
- 組態(tài)軟件技術(shù)與應(yīng)用
- 從程序員角度學(xué)習(xí)數(shù)據(jù)庫(kù)技術(shù)(藍(lán)橋杯軟件大賽培訓(xùn)教材-Java方向)