Setup environment for Symfony2 - Настройка окружения для Symfony2 на Ubuntu 14.04

This is simple instruction on how to setup environment for Symfony2 and Ubuntu 14.04:

Edit file:

 vim /etc/apache2/sites-available/000-default.conf

Edit DocumentRoot to your value, I prefer "/var/www"

Next step we need to enable mod rewrite:

a2enmod rewrite

To allow use htaccess files in our projects we need to enable this option for our dir (/var/www in this case).

vim /etc/apache2/apache2.conf

Replace "AllowOverride None" to "AllowOverride All" for section.
Restart apache

service apache2 restart

Install xdebug if it needed:

pecl install xdebug

Find place where xdebug was installed:

find / -name 'xdebug.so' 2> /dev/null

Copy this value and edit your php.ini:

vim /etc/php5/apache2/php.ini

Pase to end of file (Shift + F - go to end of file in vim):

Also you need to replace/edit some values in php.ini.
First of all, set date.timezone. You can choose it at php.net site.
Second turn on display_errors if it needed.
Restart apache

service apache2 restart

Install composer globally:

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

Install nodejs:

curl -sL https://deb.nodesource.com/setup | sudo bash -
apt-get install -y nodejs

Install bower:

npm install -g bower

That all.

Comments