User Tools

Site Tools


en:doc:repo:install:padre

PaDRe

PaDRe provides an API for storage and retrieval of PDR data sets. It comes as a Web Service which can be run by Tomcat.

Installation

Get PaDRe from the download page of the PDR project. The distribution already contains all of its library requirements.

Within the PaDRe archive, you'll find a deployable file padre.war in the bin directory. Copy it into your Tomcat's webapps directory to have it installed.

PaDRe expects the presence of a Home directory, where it's configuration and log files are located. In this example, that directory is a hidden folder called .pdr and is located at the root folder of our Tomcat instance: tomcat1/.pdr/.

Setting up PaDRe's Home directory

After deploying padre.war with Tomcat, you should find a new subdirectory padre in Tomcat's webapps directory, containing PaDRe's configuration file META-INF/context.xml.

Edit this file to set PaDRe's home directory by changing the value of Parameter env.padre.home to the according location within your .pdr config directory:

<Parameter name="env.padre.home" value="/home/tomcat8082/tomcat1/.pdr/padre" override="false" />

You might also want to change the line

url="jdbc:mysql://localhost:3306/db_padre"

to match your MySQL server's address.

From the PaDRe archive, copy the contents of subdirectory conf/ (*command.conf*, *log4j.conf*) to whatever directory you set as env.padre.home in the previous step. Edit log4j.conf and choose log file locations by absolute paths for the two variables:

log4j.appender.ARoot.file=/home/tomcat8082/tomcat1/.pdr/padre/log/root.log

and

log4j.appender.ALib.file=/home/tomcat8082/tomcat1/.pdr/padre/log/padre-main.log

PaDRe database

You need to set up a data base for PaDRe. In order to do so, use the SQL script sql/create_padre_instance_db.sql which came with your PaDRe download. First, open the file and set a data base password and the PDR instance ID as described in its header comment. Then run it like this:

mysql -u root -p < create_padre_instance_db.sql

This should create the data base PaDRe is configured to work with in its context.xml file diskussed above.

Important: To enable UTC timestamps, the value of default_time_zone in /etc/mysql/my.cnf has to be changed:

[...]
default_time_zone = '+00:00'
[...]

Restart the MySQL server afterwards to activate the modified configuration.

en/doc/repo/install/padre.txt · Last modified: 2015/07/29 14:58 by fkoerner