...
- Install an instance of MySQL and create a database user accountdatabase called
fcrepo
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-mysql/repository.json" JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.mysql.username=<username>" JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.mysql.password=<password>" JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.mysql.host=<default=localhost>" JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.mysql.port=<default=3306>"
...
Note, the fcrepo
database must be manually created, but the tables will be automatically created.
JNDI Configuration
For both of the configurations above, you may alternatively use JNDI to connect to the MySQL or PostgreSQL databases.
This was accomplished for MySQL with Tomcat 7.0.54 on RHEL 7.2 as follows: (Note: Fedora web app is deployed as 'fcrepo'. Database username and password masked.)
- Define the JNDI resource
/usr/share/tomcat/conf/Catalina/locahost/fcrepo.xml
...
language | xml |
---|
...
.
...
Database Setup
MySQL
To create a new database and user in MySQL, assuming a username of user1
and a password of xyz
:
...