Download this .zip file and unpack it in a temporary directory:
wget https://repo.open.catalyst.harvard.edu/nexus/content/groups/public/net/shrine/shrine-setup/4.2.0/shrine-setup-4.2.0-dist.zip -O shrine-setup.zip unzip shrine-setup.zip
This .zip file contains schemas as .ddls and template shrine.conf and tomcat context.xml and server.xml files. You'll be using the schemas first.
MariaDB
SHRINE uses four databases to log its operations: qepAuditDB, adapterAuditDB, stewardDB, and shrine_query_history. Sign into mariaDB as the 'shrine' user to perform these commands:
$ mysql -u shrine -pdemouser
To create the 4 SHRINE databases, you will need to run these commands within the MySQL prompt:
CREATE DATABASE adapterAuditDB; CREATE DATABASE qepAuditDB; CREATE DATABASE shrine_query_history;
After creating these databases, you will need to install schemas.
mysql -u shrine -pdemouser adapterAuditDB < shrine-setup/adapter/sql/adapterAuditDB-mysql.ddl mysql -u shrine -pdemouser shrine_query_history < shrine-setup/adapter/sql/shrine_query_history-mysql.ddl mysql -u shrine -pdemouser qepAuditDB < shrine-setup/qep/sql/mysql.ddl
Sign into MySQL as root and grant the shrine user full access again to all of these databases and their tables:
$ mysql -u root MariaDB [(none)]> GRANT ALL privileges ON *.* TO 'shrine'@'localhost'; MariaDB [(none)]> FLUSH PRIVILEGES;
MS SQL Server
Install schemas for MS SQL Server, instead of schemas labeled with mysql.sql, use schemas ending with mssql.sql from shrine-setup.zip:
- ./qep/sql/mssql.ddl
- ./adapter/sql/adapterAuditDB-mssql.ddl
- ./adapter/sql/shrine_query_history-mssql.ddl
Oracle
To install oracle schemas load all of the SHRINE databases into one central schema: ShrineDB (use this name when you configure context.xml).
Once you have created the database, load all the schemas into it. Instead of schemas labeled with mysql.sql, load schemas ending with oracle.ddl. These files are found within the shrine-setup.zip archive file:
- ./qep/sql/oracle.ddl
- ./adapter/sql/adapterAuditDB-oracle.ddl
- ./adapter/sql/shrine_query_history-oracle.ddl