데비안에서 Symfony2 프로젝트를 사용하고 있습니다. 데이터베이스를 postgresql로 변경하는 단계는 무엇입니까?Symfony 2.0에서 데이터베이스를 postgresql로 변경하는 방법은 무엇입니까?
참고 : 질문은 here으로 질문되었지만 심포니 1.4와 관련이 있습니다.
데비안에서 Symfony2 프로젝트를 사용하고 있습니다. 데이터베이스를 postgresql로 변경하는 단계는 무엇입니까?Symfony 2.0에서 데이터베이스를 postgresql로 변경하는 방법은 무엇입니까?
참고 : 질문은 here으로 질문되었지만 심포니 1.4와 관련이 있습니다.
데비안에서 PostgreSQL의 설치 : 추가, /etc/php5/apache2/php.ini에서
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
:
extension=pdo.so
extension=php_pdo_pgsql.so
변경 (이 옵션 사실상)은 온라인 애플리케이션/설정/paramters.ini 파일 :
[parameters]
database_driver: pdo_pgsql
database_host: localhost
database_port: null
database_name: mypgdatabase
database_user: mypguser
database_password: mypguserpass
Relaod 프로젝트 :
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
끝났습니다!
참고 :
당신이 사용하는 두 연결을 희망하는 경우, 여기 좀 봐 : http://stackoverflow.com/questions/8440403/how-to- create-2-connections-mysql-and-postgresql-with-doctrine2-symfony2 – Nll