PostgreSQL?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2005 12:35 PM
What is the current or future possibility of running Alfresco with the PostgreSQL db?
Labels:
- Labels:
-
Archive
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2005 01:06 PM
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
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2005 10:59 AM
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=jdbc
ostgresql://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 ?
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=jdbc

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 ?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2005 12:24 PM
As a hint, the Hibernate dialect moved for release 1.0.0 into jboss/server/default/conf/alfresco/domain/hibernate-cfg.properties
JBoss (preview) instructions can be found in this forum post: http://www.alfresco.org/forums/viewtopic.php?p=424#188
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2006 05:33 AM
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 :
in the file \PostgreSQL\8.1\data\pg_hba.conf
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
