If you're looking into using Symfony2 for your application and want to be sure your environment is set up correctly, you should definitely check out this new post from Konrad Podgórski. It's a very detailed guide to getting the full environment set up, also including setup of NodeJS and Capifony for deployment.
I decided to publish notes that I have been gathering lately about configuring servers. This is a complete guide how to configure server for production usage with Symfony or any PHP project. Instruction might seem to you very long and I totally agree with you. It took me few months to finish.
His installation includes the full commands and configuration for setting up:
- PHP (5.4)
He also includes the optional instructions to add in an opcode cache like APC or the Zend OPCache.