Configure Nuxeo 5.3 with VCS and PostgreSQL
The Visible Content Store (VCS) is the default storage backend shipped with Nuxeo EP 5.3. It uses H2 as default embedded database but this is not the one recommended for production use: Nuxeo recommends the use of PostgreSQL as storage backend. The following describes the files you need to configure to use PostgreSQL with VCS. First of all, you have to ensure that your database supports PL/PGSQL (if you have installed PostgreSQL with Windows Installer, it may be unnecessary):CREATE LANGUAGE 'plpgsql';
- config/default-repository-config.xml
<?xml version="1.0"?> <component name="org.nuxeo.ecm.core.storage.sql.config"> <extension target="org.nuxeo.ecm.core.repository.RepositoryService" point="repository"> <repository name="default" factory="org.nuxeo.ecm.core.storage.sql.coremodel.SQLRepositoryFactory"> <repository name="default"> <indexing> <!-- configuration for PostgreSQL --> <fulltext analyzer="french"/> </indexing> </repository> </repository> </extension> </component>
- datasources/default-repository-ds.xml
<?xml version="1.0"?> <connection-factories> <tx-connection-factory> <jndi-name>NXRepository/default</jndi-name> <xa-transaction/> <track-connection-by-tx/> <adapter-display-name>Nuxeo SQL Repository DataSource</adapter-display-name> <rar-name>nuxeo.ear#nuxeo-core-storage-sql-ra-1.6.0.rar</rar-name> <connection-definition>org.nuxeo.ecm.core.storage.sql.Repository</connection-definition> <config-property name="name">default</config-property> <config-property name="xaDataSource" type="java.lang.String">org.postgresql.xa.PGXADataSource</config-property> <config-property name="property" type="java.lang.String">ServerName=localhost</config-property> <config-property name="property" type="java.lang.String">PortNumber=5432</config-property> <config-property name="property" type="java.lang.String">DatabaseName=nuxeo</config-property> <config-property name="property" type="java.lang.String">User=postgres</config-property> <config-property name="property" type="java.lang.String">Password=</config-property> <max-pool-size>20</max-pool-size> </tx-connection-factory> </connection-factories>
- Don't forget to also update the datasources/nxtags-ds.xml to follow the same DB instance, the Tag Service is required to work in the same table space as the default-repository. Accordingly, this file would look like
<?xml version="1.0"?> <datasources> <xa-datasource> <jndi-name>nxtags</jndi-name> <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class> <xa-datasource-property name="ServerName">localhost</xa-datasource-property> <xa-datasource-property name="PortNumber">5432</xa-datasource-property> <xa-datasource-property name="DatabaseName">nuxeo</xa-datasource-property> <xa-datasource-property name="User">nuxeo</xa-datasource-property> <xa-datasource-property name="Password">password</xa-datasource-property> <track-connection-by-tx/> </xa-datasource> </datasources>
- You can also configure datasources/unified-nuxeo-ds.xml to store all other datas in your PostgreSQL database
<?xml version="1.0" encoding="UTF-8"?> <datasources> <local-tx-datasource> <jndi-name>NuxeoDS</jndi-name> <connection-url>jdbc:postgresql://localhost:5432/nuxeo</connection-url> <driver-class>org.postgresql.Driver</driver-class> <user-name>nuxeo</user-name> <password>password</password> <check-valid-connection-sql>;</check-valid-connection-sql> </local-tx-datasource> </datasources>
- If you changed the database used to store Jena data, you also have to change a property in config/sql.properties:
org.nuxeo.ecm.sql.jena.databaseType=PostgreSQL
- Drop the appropriate JDBC driver in $JBOSS/server/default/lib, for instance postgresql-8.3-604.jdbc3.jar for PostgreSQL 8.3
Version 10.6 last modified by Thierry Martins on 17/11/2009 at 11:03
Document data
Attachments:
No attachments for this document
Comments: 0