The Fedora 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 have been verified
- Tomcat 9 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 9
On Debian Linux systems, the typical way of setting System Properties is to update the following file:
/etc/default/tomcat9
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 9 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.home=/mnt/fedora-data
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
One option is to use the "one click" application, which comes with an embedded Jetty servlet. This can be optionally built by running:
mvn install -pl fcrepo-webapp -P one-click
and can be started by either double-clicking on the jar file or by running the following command:
java -jar ./fcrepo-webapp/target/fcrepo-webapp-<version>-jetty-console.jar
By default, a Fedora home directory, fcrepo, is created in the current directory. You can change the default location by passing in an argument when starting the one-click, e.g.:
java -Dfcrepo.home=/data/fedora-home -jar fcrepo-webapp-6.0.0-SNAPSHOT-jetty-console.jar