Instal postgresql di bawah debian:
apt-get install postgresql postgresql-client
apt-get install php5-pgsql
adduser mypguser
su - postgres
psql
CREATE USER mypguser WITH PASSWORD 'mypguserpass';
CREATE DATABASE mypgdatabase;
GRANT ALL PRIVILEGES ON DATABASE mypgdatabase to mypguser;
\q
Di /etc/php5/Apache2/php.ini, tambahkan:(ini sebenarnya opsional)
extension=pdo.so
extension=php_pdo_pgsql.so
Ubah file symfony apps/config/paramters.ini:
[parameters]
database_driver: pdo_pgsql
database_host: localhost
database_port: null
database_name: mypgdatabase
database_user: mypguser
database_password: mypguserpass
Muat ulang proyek Anda:
php bin/vendors update
php app/console assets:install web
php app/console doctrine:schema:create
php app/console doctrine:fixtures:load
chmod 777 -R app/cache app/logs
Selesai!
Referensi:
Dokumentasi Symfony untuk mengkonfigurasi database
Instalasi Postgresql di bawah debian