Version 8 (modified by joshuadf, 10 years ago) (diff)


OpenClinica Quick Install on Red Hat

This "quickstart" guide is a condensed version of the verbose instructions found in the OpenClinica download at install-docs/linux/install.txt. It should allow you to get Open`Clinica installed on a fully updated install of Red Hat Enterprise Linux 5 Update 3 (EL5.3) in a short amount of time.

Note: For Sun Java, you may need to add the channel "RHEL Supplementary (v. 5)" in the RHN web interface, or separately install and configure a JDK as described in the OpenClinica instructions. We prefer to use standard RHEL components when possible to take advantage of Red Hat's security/QA process. EL5.3's version of postgres is slightly older than in the OpenClinica recommendations, but Red Hat backports updates. We have not encountered any issues.

1. Download and install software.

1a. Install prequisite software on RHEL 5.3.

# install Java separately first because there are multiple options (Sun, IBM, BEA)
yum -y install java-1.6.0-sun-devel 
yum -y install postgresql-server tomcat5-admin-webapps 

rpm -q tomcat5 postgresql java-1.6.0-sun
# As of 2009 Mar 19
# tomcat5-5.5.23-0jpp.7.el5_2.1
# postgresql-8.1.11-1.el5_1.1
# java-1.6.0-sun-

# set up directories as they appear in the OpenClinica install.txt
ln -s /usr/share/tomcat5 /usr/local/tomcat
mkdir /usr/local/oc

1b. Download and extract OpenClinica for Linux

Register at and get OpenClinica 2.5.4 (02/17/2009), or browse for the latest version at the OpenClinica Downloads website.

Upload OpenClinica-*.tar.gz to /usr/local/oc/ on your EL5 host with a command like rsync -vaz OpenClinica-*.tar.gz $RHEL_HOST:/usr/local/oc/.

Now, on your EL5 host, decompress the download :

cd /usr/local/oc
tar zxvf OpenClinica-*.tar.gz 

2. Setup software

2a. PostgreSQL

Prepare a strong password to use for the db user and run the following:

/etc/init.d/postgresql start
chkconfig postgresql on
# change localhost access type to "md5" 
sed -i 's;          ident sameuser;          md5;' /var/lib/pgsql/data/pg_hba.conf
# switch to postgres user       
su - postgres
  createuser --no-superuser --no-createrole --no-createdb --pwprompt clinica
  # type a strong password and note it!
  createdb openclinica 
  psql -d openclinica -f /usr/local/oc/OpenClinica-*/config/database/PostgreSQL/*/install/create_database_*_tables_with_data.sql
/etc/init.d/postgresql restart
# test the connection from localhost
psql --user clinica --host localhost openclinica

2b. Tomcat

By default, Tomcat is not configured for HTTPS requests. First uncomment the Connector port="8443" section in /etc/tomcat/server.xml to configure SSL. For more information, see

# create a keystore with a self-signed certificate for Tomcat
keytool -genkey -alias tomcat -keyalg RSA -dname "cn=Mark Jones, ou=JavaSoft, o=Sun, c=US" -storepass changeit -keypass changeit
mv /root/.keystore /usr/share/tomcat5/
chkconfig tomcat5 on

2c. OpenClinica Deployment


mkdir /usr/local/tomcat/ chown tomcat:tomcat /usr/local/tomcat/

# OC is only compatible with Sun JavaMail? wget -O /usr/share/java/mail.jar /usr/sbin/alternatives --install /usr/share/java/javamail.jar javamail /usr/share/java/mail.jar 4289 /usr/sbin/alternatives --set javamail /usr/share/java/mail.jar # Bug: wget -O /var/lib/tomcat5/common/lib/naming-factory-dbcp.jar cp /usr/local/oc/OpenClinica-*/config/libraries/postgresql-8.1-405.jdbc3.jar /usr/local/tomcat/common/lib/

2b. Prepare Tomcat

# deploy

mkdir /usr/local/tomcat/webapps/OpenClinica unzip /usr/local/oc/OpenClinica-2.5.4/distribution/OpenClinica.war -d /usr/local/tomcat/webapps/OpenClinica

# configuration

cp /usr/local/tomcat/webapps/OpenClinica/META-INF/context.xml /usr/local/tomcat/conf/Catalina/localhost/OpenClinica.xml

sed -i 's;;smtpHost=localhost;' /usr/local/tomcat/webapps/OpenClinica/properties/ sed -i 's;adminEmail=.*;adminEmail=you@…;' /usr/local/tomcat/webapps/OpenClinica/properties/ # change "clinica" passwd in /usr/local/tomcat/conf/Catalina/localhost/OpenClinica.xml /etc/init.d/tomcat5 start }}}

Now go to https://localhost:8443/OpenClinica/MainMenu (root/12345678) and enjoy!