Development

SymfonyUbuntu

You must first sign up to be able to contribute.

Version 14 (modified by fabien, 11 years ago)
added Debian/Ubuntu package information

Symfony (0.6.1) installation on Ubuntu "Dapper Drake"

A Debian/Ubuntu package is also available for symfony 1.0:

$ wget http://www.symfony-project.com/get/php5-symfony_1.0.2-1_all.deb
$ dpkg -i php5-symfony_1.0.2-1_all.deb

Tested on Ubuntu Dapper Drake build 20060323

Install these packages with apt:

php5
php5-cli
php5-sqlite
php-pear

Test if Apache and PHP are up and running typing in the browser:

http://localhost/

You should see something like:

Apache/2.0.55 (Ubuntu) PHP/5.1.2-1ubuntu1 Server at localhost Port 80

From the command line, as root:

pear upgrade PEAR
pear channel-discover pear.symfony-project.com

Edit /etc/php5/cli/php.ini and change the line:

memory_limit = 8M 

to

memory_limit = 16M 

Then:

pear install symfony/symfony
pear install --alldeps http://phing.info/pear/phing-current.tgz

Using the command:

pear config-show

we find the symfony libraries have been installed in:

$php_dir/symfony/	/usr/share/php/symfony/		main libraries
$data_dir/symfony/	/usr/share/php/data/symfony/	skeleton of symfony applications, default modules and configuration
$doc_dir/symfony/	/usr/share/php/docs/symfony/	documentation

From the command line, as root:

mkdir /var/www/myproject
cd /var/www/myproject
symfony init-project myproject
symfony init-app myapp

Edit /etc/apache2/apache2.conf, and append the following at the end:

<Directory "/usr/share/php/data/symfony/web/sf">
 AllowOverride All
 Allow from All
</Directory>
<VirtualHost *>
  ServerName myapp.example.com
  DocumentRoot "/var/www/myproject/web"
  DirectoryIndex index.php
  Alias /sf /usr/share/php/data/symfony/web/sf

  <Directory "/var/www/myproject/web">
   AllowOverride All
   Allow from All
  </Directory>
</VirtualHost>

Enable mod_rewrite with the following command:

a2enmod rewrite

Add this line to /etc/hosts (this makes myapp.example.com map to localhost, so is needed if a DNS record for myapp.example.com is not configured):

127.0.0.1 myapp.example.com

Edit /etc/php5/apache2/php.ini, and change the line:

magic_quotes_gpc = On

to

magic_quotes_gpc = Off

Restart Apache:

/etc/init.d/apache2 restart

Test the installation by typing in your browser:

http://myapp.example.com/

You should see something like:

Congratulations!
If you see this page, it means that the creation of your symfony project on this system was successful.
...