jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jackrabbit Wiki] Update of "JackRabbitOnTomcat6withJndiAndPostgresql" by BearGiles
Date Wed, 06 May 2009 17:38:18 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jackrabbit Wiki" for change notification.

The following page has been changed by BearGiles:
http://wiki.apache.org/jackrabbit/JackRabbitOnTomcat6withJndiAndPostgresql

New page:
= Jackrabbit on Tomcat6 with JNDI and PostgreSQL =

== Installation ==

Install tomcat and postgresql on your system and verify they are working correctly.  On Debian/Ubuntu
development systems you can install both with "apt-get".  Be aware that many production sites
prefer to install all server software manually.

(Sidenote: it is a considered good practice to use a separate partition for each service's
data, e.g., for /var/lib/postgresql/8.3 and /var/lib/tomcat6.  This makes it easier to perform
specialized backups, migrate the data from one server to another, etc.  There's little cost
to this is you use Linux Logical Virtual Modules (lvm))

Install the jackrabbit .war file.  If the system will be a dedicated jackrabbit server you
can rename the jackrabbit-1.5.4.war file to ROOT.war and have it unpacked as ROOT.  This means
you can access the jackrabbit instance as http://example.com:8080/ instead of http://example.com:8080/jackrabbit-1.5.4/.

Finally, edit ''/etc/default/tomcat6'' to add "-Djava.rmi.server.hostname=hostname" to the
CATALINA_OPTS, where you have changed 'hostname' to a public network interface.  If you don't
the RMI library will probably pick something weird like 127.0.1.1 (NOT 127.0.0.1) and you'll
spend hours knocking head-shaped holes in the wall.  You will need to use a public network
interface to allow others to connect to the RMI server.

== Basic Configuration ==

* Create a user and database for jackrabbit.  (createuser jcr; createdb jcr).

* Create an external directory for the jackrabbit files.  By default it puts them somewhere
in the tomcat tree (under bin?), but it's a good practice to put that someplace external from
tomcat since you may want to access the repository later via a mechanism other than the tomcat
webapp.  I put it under /srv/jackrabbit.

* Copy the '''bootstrap.properties''' and '''repository.xml''' files from /WEB-INF/templates
to ''/srv/jackrabbit''.

* Edit '''/WEB-INF/web.xml''' and change the value of all ''bootstrap-config'' parameters
to ''/srv/jackrabbit/bootstrap.properties''.

* Edit '''/srv/jackrabbit/bootstrap.properties''' so ''repository.home=/srv/jackrabbit'' and
''repository.conf=/srv/jackrabbit/repository.xml''.

* Edit '''/srv/jackrabbit/repository.xml''' so all FileSystem stanzas use ''org.apache.jackrabbit.core.fs.db.DbFileSystem''
and all PersistenceManager stanzas use ''org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager''.
 Also set ''schema'' to ''postgresql'' in the PersistenceManager configuration.  Finally the
DataStore stanza should use ''org.apache.jackrabbit.core.data.db.DbDataStore'' with a ''databaseType''
(not ''schema'') of ''postgresql''.  Set ''schemaObjectPrefix'' as described in other wiki
entries.  (I use '''FS_''',
'''FS_WSP_${wsp.name}''', '''PM_WSP_${wsp.name}''', etc.)

* In all of these stanzas set the ''driver'' to ''org.postgresql.Driver'', the ''url'' to
''jdbc:postgresql://host:5432/dbname'', and the ''user'' and ''password'' as appropriate.

Restart tomcat.  The database should now contain about 20 tables, and more importantly we
know that the basic infrastructure is in place and we just need to refine it to use JNDI.

Mime
View raw message