Install Open Clinica on Linux (OpenClinica 2.5.6 in PostgreSQL)

by Ritesh


Posted on September 18, 2010 at 4:00 PM


OpenClinica is an open source Clinical Data Management system (Electronic Data capture (EDC) solution for clinical trial)

Note : The windows installation is quite straight forward, but for Linux be prepared with some more patience. If everything goes fine its your luck else be prepared to try reading lots of Linux blogs till you succeed. I have tried to address few commonly encountered issues with solutions while installing PostgreSQL.

If you don't want to use PostgreSQL then OpenClinica supports Oracle 10g as well. Oracle 10g Express edition (Oracle 10g XE) is available free to download from Oracle website. Click here if you want install instructions for OpenClinica with Oracle 10g XE.  

Operating System Tested : RHEL 4, Fedora 11 and PCLinuxOS2009

These are roughly the 5 steps to install OpenClinica on Linux :
1.Install Java [Java]
2.Install Tomcat [Java Web Server]
3 Install PostgreSQL [Database]   [To install in oracle click here]
4.Install OpenClinica 2.5.6 [OpenClinica Package]
5. Some final configurations

And at last some custom settings to suit your requirements in OpenClinica 2.5.6

Download the following :

OpenClinica-2.5.6
jdk-1_5_0_16-linux-i586.bin
apache-tomcat-5.5.27.tar.gz
postgresql-8.2.9.tar.gz

Login with your login account (ritesh in this example):
Once you have downloaded everything required, copy all the files in a folder somewhere in your home (/home/ritesh/ritesh_cdm).

[ritesh@chennai ~]$ cd ritesh_cdm/ change directory
[ritesh@chennai ritesh_cdm]$ ls
apache-tomcat-5.5.27.tar.gz  OpenClinica-2.5.6.tar.gz  jdk-1_5_0_16-linux-i586.bin  postgresql-8.2.9.tar.gz
Verify if all required files are present

Installing Java

[ritesh@chennai ritesh_cdm]$ sh jdk-1_5_0_16-linux-i586.bin
Sun Microsystems, Inc. Binary Code License Agreement

for the JAVA 2 PLATFORM STANDARD EDITION DEVELOPMENT KIT 5.0

SUN MICROSYSTEMS, INC. ("SUN") IS WILLING TO LICENSE THE
SOFTWARE IDENTIFIED .........

Do you agree to the above license terms? [yes or no] yes

inflating: jdk1.5.0_16/man/man1/jps.1
inflating: jdk1.5.0_16/man/man1/jsadebugd.1
inflating: jdk1.5.0_16/man/man1/jstack.1
inflating: jdk1.5.0_16/man/man1/jstat.1
inflating: jdk1.5.0_16/man/man1/jstatd.1
inflating: jdk1.5.0_16/man/man1/keytool.1
inflating: jdk1.5.0_16/man/man1/kinit.1
inflating: jdk1.5.0_16/man/man1/klist.1 ............
Creating jdk1.5.0_16/jre/lib/javaws.jar
Creating jdk1.5.0_16/jre/lib/deploy.jar

Done.


[ritesh@chennai ritesh_cdm]$

Start the binary file using sh, and press Ctrl-C or choose to keep on pressing Enter to complete the long license agreement from Sun Microsystems !

When asked for "Do you agree to the above license terms" type yes followed by enter key.

[ritesh@chennai ritesh_cdm]$su root
Password:
Change to root using su [superuser], because now its time to do some Java settings
[root@chennai ritesh_cdm]# mv jdk1.5.0_16 /usr/local/ move the jdk folder to /usr/local
[root@chennai ritesh_cdm]# cd /usr/local/ change directory
[root@chennai local]# ln -s jdk1.5.0_16 java create symbolic link between jdk and java folders
[root@chennai local]# echo "export JAVA_HOME=/usr/local/java" >> /etc/profile setting JAVA_HOME environment variables.

Preparing OpenClinica Package

[root@chennai local]# exit as user - navigate back to the folder
[ritesh@chennai ritesh_cdm]$ tar -xzvf OpenClinica-2.5.6.tar.gz
OpenClinica-2.5.6/install-docs/
OpenClinica-2.5.6/install-docs/windows/
OpenClinica-2.5.6/install-docs/linux/
OpenClinica-2.5.6/distribution/OpenClinica.war
OpenClinica-2.5.6/LICENSE.txt
OpenClinica-2.5.6/README.txt
....................
OpenClinica-2.5.6/config/libraries/ojdbc14-10g.jar
OpenClinica-2.5.6/config/libraries/postgresql-8.1-405.jdbc3.jar
Untar OpenClinica
[ritesh@chennai ritesh_cdm]$ su root
Password:
Change to root using su [superuser], because we need to create folders to keep open clinica files
[root@chennai ritesh_cdm]# mkdir /usr/local/oc create a folder oc in /usr/local
[root@chennai ritesh_cdm]# mv OpenClinica-2.5.6 /usr/local/oc/ Move unpacked Open Clinica folder to newly created oc folder

Installing Apache Tomcat Server
 
[root@chennai ritesh_cdm]# /usr/sbin/adduser tomcat create tomcat user
[root@chennai ritesh_cdm]# /usr/sbin/groupadd developers create group developers
[root@chennai ritesh_cdm]# gpasswd -a tomcat developers
Adding user tomcat to group developers
add tomcat to developers
[root@chennai ritesh_cdm]# mv /home/ritesh/ritesh_cdm/apache-tomcat-5.5.27.tar.gz /home/tomcat/ move tomcat tar file to tomcat users home directory
[root@chennai ritesh_cdm]# su tomcat change to tomcat user
[tomcat@chennai ritesh_cdm]$ cd /home/tomcat navigate to tomcat home directory
[tomcat@chennai ~]$ tar -zxvf apache-tomcat-5.5.27.tar.gz
apache-tomcat-5.5.27/webapps/tomcat-docs/config/globalresources.html
apache-tomcat-5.5.27/webapps/tomcat-docs/config/host.html
apache-tomcat-5.5.27/webapps/tomcat-docs/config/http.html
apache-tomcat-5.5.27/webapps/tomcat-docs/config/index.html
apache-tomcat-5.5.27/webapps/tomcat-docs/config/loader.html
apache-tomcat-5.5.27/webapps/tomcat-docs/config/manager.html
apache-tomcat-5.5.27/webapps/tomcat-docs/config/printer/ajp.html
apache-tomcat-5.5.27/webapps/tomcat-docs/config/printer/context.html
apache-tomcat-5.5.27/webapps/tomcat-docs/config/printer/engine.html .....
.........................
apache-tomcat-5.5.27/webapps/webdav/tomcat-power.gif
apache-tomcat-5.5.27/webapps/webdav/tomcat.gif

[tomcat@chennai ~]$
untar apache tomcat
[tomcat@chennai ~]$ exit change user to root
[root@chennai ~]# mv /home/tomcat/apache-tomcat-5.5.27 /usr/local/ shift the unpacked tomcat folder to /usr/local
[root@chennai ~]# cd /usr/local get inside /usr/local
[tomcat@chennai local]# ln -s apache-tomcat-5.5.27 tomcat create symbolic link between apache and tomcat folders
[tomcat@chennai local]# echo "export CATALINA_HOME=/usr/local/tomcat" >> /etc/profile setting CATALINA_HOME environment variables.
[root@chennai local]# cp /usr/local/oc/OpenClinica-2.5.6/install-docs/linux/tomcatd /etc/init.d/ Copy tomcat daemon to init.d folder
[root@chennai local]# cd /etc/init.d get inside init.d folder
[root@chennai local]# chmod 755 tomcatd assign privileges to tomcatd
[root@chennai local]# /sbin/chkconfig --del tomcatd remove any previous chkconfig managed service for tomcat (if any)
[root@chennai local]# /sbin/chkconfig --add tomcatd set tomcatd to run as service

Restart Computer and type http://localhost:8080 to verify if tomcat is working
 

Next >>> Installing PostgreSql