PostgreSQL Installation
Follow these instuctions:- Download and install PostgreSQL (http://www.postgresql.org/)
- Download appropriate Postgres JDBC driver (or directly from the Maven Central Repository and copy the JAR into your container's common lib directory or in the XWiki webapp (in WEB-INF/lib)
- Start PostgreSQL
- Create the xwiki user (pick any password you want), and the xwiki database:
# psql -U replace_with_your_admin_user_eg_pgsql template1; // Input password // Create database // 1. create a database CREATE DATABASE xwiki WITH OWNER = replace_with_your_admin_user_eg_pgsql ENCODING = 'UNICODE' TABLESPACE = pg_default; // connect to xwiki connect xwiki // 2. create a user xwiki CREATE USER xwiki PASSWORD 'xwiki' VALID UNTIL 'infinity'; // 3. create a group xwiki and add the xwiki to the group CREATE GROUP xwiki; ALTER GROUP xwiki ADD USER xwiki; // 4. grant access to the database for the group xwiki GRANT ALL ON SCHEMA public TO xwiki;
# createuser xwiki -S -D -R -P -Upostgres ## enter password, ie: 'xwiki' # createdb xwiki -Eunicode -Oxwiki -Upostgres
- Tell XWiki to use PostgreSQL. To do this, edit the WEB-INF/hibernate.cfg.xml file where you have expanded the XWiki WAR file. Replace the matching properties with the following ones (modify the hostname and password accordingly):
<property name="connection.url">jdbc:postgresql://localhost:5432/xwiki</property> <property name="connection.username">xwiki</property> <property name="connection.password">your password</property> <property name="connection.driver_class">org.postgresql.Driver</property> <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property> <mapping resource="xwiki.hbm.xml"/> <mapping resource="feeds.hbm.xml"/>
Version 1.24 last modified by VincentMassol on 08/01/2008 at 16:51
Document data
Attachments:
No attachments for this document
Comments: 6