Changes for page PostgreSQL Installation
Last modified by Vincent Massol on 2024/03/15
From version 3.1
edited by Vincent Massol
on 2011/12/15
on 2011/12/15
Change comment:
Document converted from syntax xwiki/1.0 to syntax xwiki/2.0
To version 4.1
edited by Vincent Massol
on 2011/12/15
on 2011/12/15
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,0 +1,1 @@ 1 +PostgreSQL Installation - Content
-
... ... @@ -1,20 +3,16 @@ 1 -= PostgreSQL Installation = 2 - 3 3 Follow these instuctions: 4 4 5 5 * Download and install PostgreSQL (http://www.postgresql.org/) 6 6 * Download appropriate [[Postgres JDBC driver>>http://jdbc.postgresql.org/download.html]] (or directly from the [[Maven Central Repository>>http://repo1.maven.org/maven2/postgresql/postgresql/]] and copy the JAR into your container's common lib directory or in the XWiki webapp (in ##WEB-INF/lib##) 7 7 * Start PostgreSQL 8 -* Create the ##xwiki## user (pick any password you want), and the ##xwiki## database: 6 +* Create the ##xwiki## user (pick any password you want), and the ##xwiki## database:((( 9 9 10 10 {{code language="none"}} 11 -# psql -U replace_with_your_admin_user_eg_pgsql template1; 12 -// Input password 13 -// Create database 9 +# psql -U <replace_with_your_admin_user_eg_postgres>; 14 14 15 15 // 1. create a database 16 16 CREATE DATABASE xwiki 17 -WITH OWNER = replace_with_your_admin_user_eg_pgs ql13 +WITH OWNER = <replace_with_your_admin_user_eg_postgres> 18 18 ENCODING = 'UNICODE' 19 19 TABLESPACE = pg_default; 20 20 ... ... @@ -24,15 +24,11 @@ 24 24 // 2. create a user xwiki 25 25 CREATE USER xwiki PASSWORD 'xwiki' VALID UNTIL 'infinity'; 26 26 27 -// 3. create a group xwiki and add the xwiki to the group 28 -CREATE GROUP xwiki; 29 -ALTER GROUP xwiki ADD USER xwiki; 30 - 31 -// 4. grant access to the database for the group xwiki 23 +// 3. grant access to the database for the group xwiki 32 32 GRANT ALL ON SCHEMA public TO xwiki; 33 33 {{/code}} 34 34 35 - another way, if you have 'createuser' and 'createdb' programs in your{{velocity filter="none"}}{{html clean="false" wiki="true"}}$PATH{{/html}}{{/velocity}}and'postgres'is admin user forpostgresql(this is by default inpostgresqlinstallation onlinux):27 +Another way, if you have 'createuser' and 'createdb' programs in your ##$PATH## and ##postgres## is admin user for PostgreSQL (this is by default in PostgreSQL installation on Linux): 36 36 37 37 {{code}} 38 38 # createuser xwiki -S -D -R -P -Upostgres ... ... @@ -39,16 +39,10 @@ 39 39 ## enter password, ie: 'xwiki' 40 40 # createdb xwiki -Eunicode -Oxwiki -Upostgres 41 41 {{/code}} 42 - 43 -* 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): 44 - 34 +))) 35 +* Tell XWiki to use Oracle. To do this, edit the ##WEB-INF/hibernate.cfg.xml## file where you have expanded the XWiki WAR file and uncomment the PostgreSQL part. Make sure to review the ##connection.url## property. For example a typical value would be:((( 45 45 {{code}} 46 46 <property name="connection.url">jdbc:postgresql://localhost:5432/xwiki</property> 47 -<property name="connection.username">xwiki</property> 48 -<property name="connection.password">your password</property> 49 -<property name="connection.driver_class">org.postgresql.Driver</property> 50 -<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property> 51 - 52 -<mapping resource="xwiki.hbm.xml"/> 53 -<mapping resource="feeds.hbm.xml"/> 54 54 {{/code}} 39 +))) 40 +