Versions Compared

Key

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

...

Expand
titleClick here for instructions to connect to H2...


Info

You can connect to the H2 database by:

  1. Downloading a copy of h2 (needs to match the version used by the version of fedora that you're using, which is 2.1.210 for the latest release): https://mvnrepository.com/artifact/com.h2database/h2/2.1.210
  2. Launch the h2 web console (this should open a webpage in your browser):

    Code Block
    java -jar h2-2.1.210.jar


  3. Open the db by specifying the jdbc url, for example jdbc:h2:/home/jdoe/Downloads/fcrepo/fcrepo-home/data/fcrepo-h2 .
    When you start fedora, there should be a log line like 

    Code Block
    INFO 15:48:22.039 [main] (DatabaseConfig) JDBC URL: jdbc:h2:/Users/psmith/www/fcrepo/ocfl_temp/data/fcrepo-h2;FILE_LOCK=SOCKET

    Copy the value from there.

  4. Remove the default user name
  5. Click "connect"

Note, you can't have fedora running when you connect to the db.


However, for production installations, it is recommended to use a MariaDB,  MySQL or PostgreSQL database.

...

Below are the steps to use MySQL, MariaDB or PostgreSQL, as well as Docker instructions if you choose to run your database in a Docker container.

Info

For the full list of database properties, please refer to the Database section of the Properties documentation.

You can find additional information on this wiki about how Fedora rebuilds these caches and the structure of the tables in the database.


Table of Contents

Native Database Setup

...