cancel
Showing results for 
Search instead for 
Did you mean: 

PostgreSQL?

hotmop
Champ in-the-making
Champ in-the-making
What is the current or future possibility of running Alfresco with the PostgreSQL db?
4 REPLIES 4

kevinr
Star Contributor
Star Contributor
Alfresco supports most databases including the one you mention - through using the Hibernate object-relational mapping technology.

Derek replied on a previous thread with this info:

>You change the DAO by changing the Hibernate SQL dialect. With a BIG thanks to Hibernate, look for the following in application-context.xml:
Example Code:
<prop key="hibernate.dialect" >org.hibernate.dialect.MySQLDialect</prop>
And that is it. Check out the available hibernate dialects.

You should find your DB in the list of dialects and make the changes as above.

Cheers,

Kevin

dan3
Champ in-the-making
Champ in-the-making
Here are some notes on how I installed postgresql

unpack /opt/alfresco/tomcat/webapps/alfresco.war file to a seperate directory

In
WEB-INF/classes/alfresco/hibernate-context.xml
change: org.hibernate.dialect.MySQLDialect
to:     org.hibernate.dialect.PostgreSQLDialect


In WEB-INF/classes/alfresco/repository.properties
change from:
db.driver=org.gjt.mm.mysql.Driver
db.name=alfresco
db.url=jdbc:mysql:///${db.name}
db.username=alfresco
db.password=alfresco

change to:
db.driver=org.postgresql.Driver
db.url=jdbcSmiley Tongueostgresql://localhost/alfresco
db.username=alfresco
db.password=alfresco

jar -cf alfresco.war *
cp alfresco.war /opt/alfresco/tomcat/webapps
rm -rf /opt/alfresco/webapps/alfresco



psql -U postgres -h localhost template1
>create database alfresco
>create user alfresco with password 'alfresco';
>grant all on database alfresco to alfresco
>\quit

restart alfresco. It worked for me.

By the way, anyone having trouble getting the newly created space Users as outlined in the tutorial to appear when creating a new user ?




Smiley Very Happy

rbramley
Champ in-the-making
Champ in-the-making
As a hint, the Hibernate dialect moved for release 1.0.0 into jboss/server/default/conf/alfresco/domain/hibernate-cfg.properties

hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect‍‍‍

JBoss (preview) instructions can be found in this forum post: http://www.alfresco.org/forums/viewtopic.php?p=424#188

sam69
Champ in-the-making
Champ in-the-making
Thanks for this procedure !

It's working for me with postgres, but I had some trouble with the postgres authentification. After some modification in the pg_hba.conf, I manage to make it work with those line :

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD# IPv4 local connections:host    all         all         127.0.0.1/32          trust‍‍‍‍

in the file \PostgreSQL\8.1\data\pg_hba.conf