Pages

Sunday, April 14, 2013

installing symfony2 on ubuntu

system requirements
before all, you should install php, mysql and apache2 on your computer

then apache2 must be configured.

  1. enable mod rewrite
  2. set allowoveride to fileinfo
to do above things execute fallowing commands in terminal

  1. sudo a2enmod rewrite
  2. sudo gedit /etc/apache2/sites-available/default and then  set AllowOverride None to AllowOverride FileInfo
 as well as for this tutorial composer , mongodb should be installed on your computer

installing symfony2 
download the latest version from http://symfony.com/download 

extract & rename(kanablog) it and copy to document root. kanaslab.org is the project name here

update the source by using composer (sudo composer update;)

start the server “php app/console server:run

and to test your installation goto     http://localhost:8000/config.php

now change the permission
    $ rm -rf app/cache/*
    $ rm -rf app/logs/*
    sudo setfacl -R -m u:www-data:rwx -m u:<computer name>:rwx app/cache app/logs
    sudo setfacl -dR -m u:www-data:rwx -m u:<computer name>:rwx app/cache app/logs

OR
    sudo chmod -R 777 *

update the source using  composer

$ php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"
$ php composer.phar update 










 

No comments:

Post a Comment