Installation of Symfony 2.* (Lesson 2. Preparation)
So ... We have already familiarized ourselves with Symfony framework (here) and gained the courage to install it. Symfony installation can be done in two ways. The first one is manual - download the archive from the official website (http://symfony.com/, just in case =)) All according to the standard - download, unpack to the web server directory, use. But since the framework symphony uses many third-party libraries, it is much more convenient to use Composer - a dependency manager for php - for installation and updating. Install composer:
(I hope you already have php with curl installed? =) If not, you can read here about how to set up a web server on Ubuntu here)
curl -s https://getcomposer.org/installer | php
Now the composer.phar file will appear in the current directory.
That's almost it! All that's left is to call the configuration script http://your_host/config.php
php composer.phar create-project symfony/framework-standard-edition /path/to/webroot/
To avoid further problems, I advise you to immediately set the permissions to 777 for the app/logs and app/cache directories so that the server can create files there... This is not the best solution (actually, you need to work your brain and give write permission to your user and the web server user), but it works everywhere and is the simplest. And we're just learning =)
Personally, I have to repeat these actions after each cache clearing.
chmod -R 777 app/logs
chmod -R 777 app/cache
After configuring everything, we are ready to start developing a project on Symfony 2