postgresql unter Debian installieren:
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
In /etc/php5/apache2/php.ini hinzufügen: (dies ist in der Tat optional)
extension=pdo.so
extension=php_pdo_pgsql.so
Ändern Sie die symfony apps/config/paramters.ini Datei:
[parameters]
database_driver: pdo_pgsql
database_host: localhost
database_port: null
database_name: mypgdatabase
database_user: mypguser
database_password: mypguserpass
Relaod Ihr Projekt:
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
Sie sind fertig!
Referenzen:
Symfony documentation for configuring databases
Postgresql installation under debian
Wenn Sie zwei Verbindungen hoffen, gerade hier einen Blick: http://stackoverflow.com/questions/8440403/how-to- create-2-connections-mysql-und-postgresql-with-lehre2-in-symfony2 – Nll