Old Release

This documentation covers an old version of Fedora. Looking for another version? See all documentation.

See the Quick Start guide to getting Fedora 4 up and running as quickly as possible.

Although deploying Fedora 4 is as easy as downloading the WAR file and copying to your servlet container's webapps directory, this document details the process.

Downloads

See the latest release for Fedora 4 WAR files to download.


System Requirements

  • Java 7

    java -version
    java version "1.7.0_09"
    Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
    Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)
  • Servlet 3.0 container such as:

Deploying with Tomcat 7

  1. Download and install Tomcat 
  2. Set the Java properties for Tomcat (see: Application Configuration and Catalina Java Properties sections below)
  3. Copy the Fedora 4 WAR file into Tomcat's "webapps" directory (e.g. /var/lib/tomcat7/webapps)

  4. Start the server
  5. Go to the browser page that matches your fedora 4 WAR file name (e.g. http://localhost:8080/fcrepo-webapp-4.0.0-beta-4-SNAPSHOT/rest)

Deploying with Jetty 8

  1. Download and install Jetty
  2. Set the Java properties for Jetty  (see: Application Configuration and Catalina Java Properties sections below)
  3. Copy the Fedora 4 WAR file into Jetty's "webapps" directory (e.g. /var/lib/jetty/webapps)
  4. Start the server
  5. Go to the browser page that matches your fedora 4 WAR file name (e.g. http://localhost:8080/fcrepo-webapp-4.0.0/rest)

Application Configuration

The Fedora 4 web-application supports several deploy-time, system-level configuration options. These configuration elements are set via the definition of System Properties.

Deployments

Four means of deploying Fedora 4 have been verified

  • Tomcat 7 servlet container
  • Jetty 9 servlet container
  • Maven jetty:run plugin - for testing
  • One-Click Run - for testing

Each of these deployment approaches has its own way of setting System Properties.

Tomcat 7

On Debian Linux systems, the typical way of setting System Properties is to update the following file:

/etc/default/tomcat7

Within that file, new properties can be added per the example below:

JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.home=/mnt/fedora-data"

Additional information regarding the configuration of System Properties in Tomcat 7 can be found here.

Windows notes

Alternatively on Windows systems you can set the following file:

CATALINA_BASE/bin/setenv.bat (windows)

Within that file, new properties can be added per the example below:

set CATALINA_OPTS=%CATALINA_OPTS% -Dfcrepo.ispn.repo.CacheDirPath=F:\fedora\cache
When starting up tomcat on windows if you receive an error like the following it may be necessary to include a fcrepo.ispn.repo.CacheDirPath like above.
Caused by: org.fusesource.leveldbjni.internal.NativeDB$DBException: IO error: F:\apache-tomcat-7.0.50-windows-x64\apache-tomcat-7.0.50\bin\fcrepo4-data\fcrepo.ispn.repo.CacheDirPath\data\MANIFEST-000002: The handle is invalid.

Jetty 9

On Debian Linux systems, one way of setting System Properties is to update the following file:

/etc/default/jetty

Within that file, new properties can be added per the example below (note the use of JAVA_OPTIONS instead of JAVA_OPTS):

JAVA_OPTIONS="${JAVA_OPTIONS} -Dfcrepo.home=/mnt/fedora-data"

Additional information regarding the configuration of System Properties in Jetty 9 can be found here.

Windows notes

Alternatively on Windows systems you can set the following file:

{JETTY_DIST}/start.ini

Within that file, new properties can be added per the example below:

--exec
-Dfcrepo.home=/mnt/fedora-data

Maven jetty:run

System Properties can be set when using the Maven jetty:run plugin by passing them per the example below:

mvn -Dfcrepo.home=/mnt/fedora-data jetty:run

One-Click Run

If the One-Click Run is started from the command line, System Properties can be passed in per the example below:

java -Dfcrepo.home=/mnt/fedora-data -jar fcrepo-webapp-jetty-console.war 

Configuration Elements

There are a number of configuration elements that can be optionally be set when starting the Fedora 4 web-application. No configuration elements are required to be set, as they all default values (noted below within brackets: <>).

fcrepo.home=<cwd/fcrepo4-data>

This can be set to a path (relative to the current working directory or absolute) to which Fedora repository content will be written.  Any of the Modeshape and Infinispan configuration options below will default to being within this folder if unset or if set to a relative path.  If unset, content will be put in the "fcrepo4-data" directory within the current working directory.

fcrepo.modeshape.configuration=<classpath:/config/repository.json | file:/path/to/repository.json>

This specifies the configuration for the underlying Modeshape repository. See other available options for this value within the source tree. The default file is located within the WAR file under WEB-INF/classes/config.

fcrepo.infinispan.cache_configuration=<config/infinispan.xml>

This specifies the underlying Infinispan cache configuration. This value has a tested default set in the modeshape.json file mentioned above; and therefore, can usually be left as is. The default file is located within the WAR file under WEB-INF/classes/config.

java.io.tmpdir=</tmp on Linux, $TMPDIR on MacOSX, and %TEMP% on Windows>

This specifies the directory for writing temp files.  You may need to set this property to a larger disk/filesystem to upload large files, particularly on Linux where /tmp is sometimes on a small partition.

Modeshape and Infinispan

The Modeshape and Infinispan configurations mentioned above have a number of more detailed configuration elements that can optionally be set. To see exactly which elements are available to be set, inspect the repository.json and infinispan.xml files specified above. Those files can be browsed in the source tree in:

Some common elements for Modeshape and Infinispan relate to the directories in which application information is persisted. As mentioned above, if no fcrepo.home property is set then application information will be persisted under the directory "fcrepo4-data" in the application's current working directory. There will then be several directories within "fcrepo4-data" that are named by default with the name of the property that can be set to configure each of those directories.

Below are some common examples of these directories:

fcrepo.ispn.repo.CacheDirPath

Contains the serialized repository resource properties.

 

fcrepo.modeshape.index.location

Contains the internal Lucene index used by Modeshape/Admin Search.

 

fcrepo.activemq.dir

Contains the reliable messaging information maintained by ActiveMQ.

 

com.arjuna.ats.arjuna.common.ObjectStoreEnvironmentBean.default.objectStoreDir
com.arjuna.ats.arjuna.objectstore.objectStoreDir

Contain JBoss JTA transaction engine artifacts.

Catalina Java Properties

fcrepo.home=<some-writable-directory>

Sets the home for Fedora's persisted data. Without this setting Fedora tries to use the current-working-directory as the home of persisted data. If the Tomcat user does not have write access to the installation area (e.g. /var/lib/tomcat7), then Fedora 4 will not deploy. Set this system property to a directory writable by the tomcat process.

JVM Tuning Properties

We have a separate page with suggested VM options for general Java tuning.

Clustering Properties (only effective in a clustered configuration)

-Djgroups.tcp.address=<ip-address>
-Dfcrepo.ispn.numOwners=<num-nodes-in-cluster>
-Djava.net.PreferIPv4Stack=true
-Dfcrepo.ispn.replication.timeout=<timeout-in-ms>
  • fcrepo.ispn.replication.timeout can be used to set the timeout of infinispan replication in a clustered environment