Symfony2: Installation

The official installation doc is

As a best practice, don’t install symfony in MAC or Windows, install in Linux and use Linux for development because you will be using Linux for hosting.

For consistency in development, develop in virtual machine. The spec of the virtual machine should be the same as the production server. The best way to do it is to use vagrant.

In this example, we will create a ficticious project called SongBird. First of all, we need to create a portable and consistent development environment so that we speak the same language. This is also important if you decide to outsource the development in the future. Next we need a tool like puppet to configure automate software configuration.

To get started, let’s get this symfony repo –

git clone
vagrant up

This will take a long time… most of the alerts you see in the screen is harmless. this is a once off setup. Enter root password when prompted.

According to the doc, you can choose a number of ways to install symfony, most people chose the composer method. Don’t use composer or manually download, install the symfony command line instead.

vagrant ssh
# you are now in the virtual machine
sudo curl -LsS -o /usr/local/bin/symfony
sudo chmod a+x /usr/local/bin/symfony

To create a new project call “songbird” using the long term support version,

cd /vagrant
symfony new songbird lts
cd songbird
sed "s/''/'',''/g" -i web/app_dev.php
# check that all requirements met
php app/check.php
# you should see that the config has passed

In your parent host, we need to add get to be pointing to the vm. add this to your host file.

In your parent, Test your site by going to

If you see the word “Homepage”, everything is good.

Now let us commit everything before we proceed.

git init .
git add .
git commit -m"init commit"
Like it.? Share it:

Comments are closed.