How to install symfony framework on Ubuntu

Symfony

Posted on 02 Aug 16 by Vickey
  491



Symfony is a very powerful and popular php framework. Many other php frameworks are based on symfony. In this blog we will learn to install symfony on a ubuntu system. There are two ways to iinstall symfony.

1. Install by using composer

2. Use symfony installer

Install by using composer : For install symfony by using composer first you need to install composer ( if not already installed ). Once you have install composer open your terminal and go to directory where you want to put your projects ( in web root directory)

For example 

vickey@vickey-HP-2000-Notebook-PC:~$ cd /opt/lampp/htdocs

 

when you are in your web root directory run the below command

vickey@vickey-HP-2000-Notebook-PC:/opt/lampp/htdocs$  composer create-project symfony/framework-standard-edition myblogs "3.1.*"

here 3.1 is symfony version which will be install. One the process complete you can see new symfony projects in your web root directrory. Now run server by using the below command

php bin/console server:run

and now you can access it by url   http://127.0.0.1:8000

In other way we can istall it by using symfony installer

Use symfony installer : First need to install symfony installer. You can install it by using 

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

Now you can install symfony project by using the below command

symfony new my_project_name

 

 

 


If this post help you reduce time to develop, you can help me to maintain this website :)
www.000webhost.com