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 For testing, a file-based objects database may be useful. However, for production installations, it is recommended to use a MySQL or PostgresSQL object store. Below are the steps to use MySQL or PostgreSQL instead of LevelDB.
...
.
...
MySQL
- Install an instance of MySQL and create a database user account
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 database and table used by ISPN are auto- the fcrepo
database must be manually created, but the tables will be automatically created.
PostgreSQL
- Install PostgreSQL and create a database called
ispn
andfcrepo
and a user account that can access it - Run Fedora with the following
JAVA_OPTS
:
Code Block |
---|
JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.modeshape.configuration=classpath:/config/jdbc-postgresql/repository.json" JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.ispn.postgresql.username=<username>" JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.ispn.postgresql.password=<password>" JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.ispn.postgresql.host=<default=localhost>" JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.ispn.postgresql.port=<default=5432>" |
Note, the ispn
fcrepo
database must be manually created, but the tables will be automatically created.
...