Monday, 4 February 2013

Create an additional OpenClinica instance

Following on from the situation we were in in previous post we can create a .war file

Using an Ubuntu 12.10 desktop we are going to create an OpenClinica 3.1 instance on a existing SuSe install. This time called researcher.war.


cd /usr/local/oc/distribution/OpenClinica
emacs WEB-INF/classes/datainfo.properties
jar -cvf ../researcher.war *

The properties to change are:

dbHost=db.host.name
#slightly different than default configuration
filePath=${catalina.home}/openclinica.data/${WEBAPP.lower}/
sysURL=https://machinename/${WEBAPP}/MainMenu
log.dir=/var/log/tomcat6/${WEBAPP}

Copy war to remote host and login.


mkdir  /usr/share/tomcat6/openclinica.data/
mkdir  /usr/share/tomcat6/openclinica.data/researcher
chown -R tomcat:tomcat  /usr/share/tomcat6/openclinica.data/

We are using a remote db server. Login to db server, here we have Postgresql 8.4.7 installed.


sudo su postgres
psql
  CREATE ROLE clinica LOGIN ENCRYPTED PASSWORD 'clinica' SUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
  CREATE DATABASE researcher WITH ENCODING='UTF8' OWNER=clinica";
  ALTER USER clinica WITH PASSWORD 'XXXX';

Back on the application server


cd /etc/apache2/vhosts.d/
emacs ours.conf

Add our new webapp

        JkMount /researcher/* worker1


/etc/init.d/tomcat6 stop
cp researcher.war /usr/share/tomcat6/webapps/
/etc/init.d/tomcat6 start

This should give you a clean system at https://machinename/researcher/MainMenu with a username of root and a one time password of 12345678.

No comments:

Post a Comment