How to install symfony on ubuntu linux step by step

Currently I have started working in symfony phpframework for developing sites. My primary job was to install Symfony on my Ubuntu machine. Follow are the steps I  did For installing symfony on my machine.

1.Update souces list.

apt-get update and apt-get upgrade for new packages.

2.Installing Pear on you machine.

sudo apt-get install php-pear

3.Installation starts for Symfony

sudo pear channel-discover

sudo pear install symfony/symfony-1.4.6

Now follow the below steps.

cd /var/www

mkdir symfony

cd symfony

creating project
symfony generate:project symfony

if you need to connect database run below command
symfony configure:database "mysql:host=localhost;dbname=dbname" username password

frontend creation
symfony generate:app frontend

Next we have to create a symlink this will allow the new project we created to use the Symfony libraries and elements installed earlier. With me you are still in /var/www/symfony

cd web/

ln -s /usr/share/php/data/symfony/web/sf/

That’s it. Now you can visit your site. Enter in browser address bar http://localhost/symfony/web/


If installation goes well , You will see below screen shot of symfony.





One comment on “How to install symfony on ubuntu linux step by step”

  1. Uvray90 says:

    Very cool and easy tutorial. Thanks alot.
    Unni (India)

Leave a Reply