Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

By default, Fedora comes configured to write binary resources (i.e. files) to the file system and RDF resources (i.e. objects) to a LevelDB database. It is often desirable to replace the LevelDB database with a different object store. As of 2016-03-04, the configuration for MySQL or PostgreSQL databases are available within the deployable Fedora war file.  Below are the steps to use MySQL or PostgreSQL instead of LevelDB.

Performance Note: For ModeShape configured to use Infinispan, it may be desirable to index the 'version' column of the 'ispn_entry_FedoraRepository' table.  See discussion at https://groups.google.com/d/topic/fedora-tech/dnyGQvatIfU/discussion and Infinispan issue https://issues.jboss.org/browse/ISPN-6710.

MySQL

  1. Install an instance of MySQL and create a database user account
  2. Run Fedora with the following JAVA_OPTS:

    Code Block
    JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.modeshape.configuration=classpath:/config/jdbc-mysql/repository.json"
    JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.ispn.mysql.username=<username>"
    JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.ispn.mysql.password=<password>"
    JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.ispn.mysql.host=<default=localhost>"
    JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.ispn.mysql.port=<default=3306>"

...

Note, the ispn database must be manually created, but the tables will be automatically created.

For performance reasons, it may be desirable to index the 'version' column of the 'ispn_entry_FedoraRepository' table.  

See:

...

JNDI Configuration

For both of the configurations above, you may alternatively use JNDI to connect to the MySQL or PostgreSQL databases.

...