Changes between Initial Version and Version 1 of OpenClinicaRedHat

10/13/09 16:38:03 (8 years ago)



  • OpenClinicaRedHat

    v1 v1  
     1= OpenClinica Quick Install on Red Hat = 
     3This "quickstart" guide is a condensed version of the verbose instructions found in the Open``Clinica 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. 
     5Note: 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 Open``Clinica 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 Open``Clinica recommendations, but Red Hat backports updates. '''Warning: we have experienced some issues with dataset extracts related to PostgreSql version.''' 
     7See also OpenclinicaFedora for installation on Fedora. 
     9== 1. Download and install software. == 
     13=== 1a. Install prerequisite software === 
     15# install Java separately first because there are multiple options (Sun, IBM, BEA) 
     16yum -y install java-1.6.0-sun-devel  
     17yum -y install postgresql-server tomcat5-admin-webapps  
     19rpm -q tomcat5 postgresql java-1.6.0-sun 
     20# As of 2009 Mar 19 
     21# tomcat5-5.5.23-0jpp.7.el5_2.1 
     22# postgresql-8.1.11-1.el5_1.1 
     23# java-1.6.0-sun- 
     27=== 1b. Download and extract OpenClinica for Linux === 
     29First we'll set up links so that both Red Hat's default OS tools and OpenClinica install.txt instructions will work.  
     30In short the downloads will live in `/usr/local/oc/` while the live webapp and data will be visible as `/usr/local/tomcat/` 
     31but really live in `/var/lib/tomcat5/` per Linux Standard Base (LSB). 
     33mkdir /var/lib/tomcat5/ 
     34chown tomcat:tomcat /var/lib/tomcat5/ 
     35ln -s /var/lib/tomcat5/ /usr/share/tomcat5 
     36ln -s /usr/share/tomcat5 /usr/local/tomcat 
     37mkdir /usr/local/oc 
     40Next [ Register at] and get latest version at the [ OpenClinica Downloads] website. 
     42Upload your OpenClinica-*.tar.gz download to `/usr/local/oc/` on your EL5 host with a command like `rsync -vaz OpenClinica-*.tar.gz $RHEL_HOST:/usr/local/oc/`. 
     44Now, on your EL5 host, decompress the download : 
     46cd /usr/local/oc 
     47tar zxvf OpenClinica-*.tar.gz  
     50Make sure you only have one `/usr/local/oc/OpenClinica-*` directory or some of the commands below will fail. 
     51If you have older versions of OpenClinica you can move them to an `oldversions/` directory. 
     53== 2. Setup software == 
     55=== 2a. PostgreSQL === 
     57Prepare '''a strong password''' to use for the db user and run the following: 
     60/etc/init.d/postgresql start 
     61chkconfig postgresql on 
     62# change localhost access type to "md5"  
     63sed -i 's;          ident sameuser;          md5;' /var/lib/pgsql/data/pg_hba.conf 
     64# switch to postgres user        
     65su - postgres 
     66  createuser --no-superuser --no-createrole --no-createdb --pwprompt clinica 
     67  # type a strong password and note it! 
     68  createdb openclinica  
     69  psql -d openclinica -f /usr/local/oc/OpenClinica-*/config/database/PostgreSQL/*/install/create_database_*_tables_with_data.sql 
     71/etc/init.d/postgresql restart 
     72# test the connection from localhost -- type your strong password  
     73psql --user clinica --host localhost openclinica 
     76=== 2b. Tomcat === 
     78Below are several small Tomcat configuration changes, bugfixes, and workarounds:  
     81# set tomcat to start automatically on boot 
     82chkconfig tomcat5 on 
     84# install postgresql JDBC driver per OpenClinica instructions 
     85cp /usr/local/oc/OpenClinica-*/config/libraries/postgresql-8.1-405.jdbc3.jar /usr/local/tomcat/common/lib/ 
     87# remove problematic impl jars; this must be done after each Red Hat tomcat update 
     88# or OpenClinica rule import will fail with "Cannot find the declaration of element 'RuleImport'" 
     89rm -f /usr/local/tomcat/common/endorsed/* 
     90# Bug: 
     91wget -O /var/lib/tomcat5/common/lib/naming-factory-dbcp.jar 
     92# Open``Clinica is only compatible with Sun Java``Mail 
     93wget -O /usr/share/java/mail.jar 
     94/usr/sbin/alternatives --install /usr/share/java/javamail.jar javamail /usr/share/java/mail.jar 4289 
     95/usr/sbin/alternatives --set javamail /usr/share/java/mail.jar  
     98By default, Tomcat is not configured for encrypted (HTTPS) requests. If you want to 
     99pass requests through an Apache httpd server, see ApacheConfig for details. Alternatively you 
     100can [ configure Tomcat to serve SSL requests]  
     101by editing `/etc/tomcat/server.xml`. First uncomment the `Connector port="8443"` section,  
     102then create a keystore with a self-signed certificate for Tomcat: 
     104keytool -genkey -alias tomcat -keyalg RSA -dname "cn=Mark Jones, ou=JavaSoft, o=Sun, c=US" -storepass changeit -keypass changeit 
     105mv /root/.keystore /usr/local/tomcat/ 
     107service tomcat5 start 
     108# verify it is now running 
     109netstat -anp |grep 8443 
     110# tcp        0      0 :::8443                     :::*                        LISTEN      581/java             
     114=== 2c. OpenClinica Deployment === 
     117# pre-deploy the WAR; we will edit some files before restarting Tomcat 
     118cp /usr/local/oc/OpenClinica-*/distribution/OpenClinica.war /usr/local/tomcat/webapps  
     121Lastly, in `/usr/local/tomcat/conf/Catalina/localhost/OpenClinica.xml` change the `JDBCRealm` and `SQLPostgres` password lines for the "clinica" user to your db password and then run 
     123# change OpenClinica settings 
     124sed -i 's;;smtpHost=localhost;' /usr/local/tomcat/webapps/OpenClinica/properties/ 
     125sed -i 's;adminEmail=.*;adminEmail=you@your.domain;' /usr/local/tomcat/webapps/OpenClinica/properties/ 
     126/etc/init.d/tomcat5 restart 
     129Now go to https://localhost:8443/OpenClinica/MainMenu (root/12345678) and enjoy! If you cannot log in, check the log files in `/usr/local/tomcat/logs/` for details. 
     132= Debugging OpenClinica = 
     134There are many places to find logs of errors occurring in OpenClinica. Ideally users will see helpful messages, but sometimes it is a generic message. 
     135For example, one of our users had a created a CRF with different RESPONSE_OPTIONS_TEXT columns, but identical RESPONSE_LABEL columns. When trying to 
     136preview the CRF, OpenClinica simply output "An error has occurred in the application." 
     138I found the following message in the tomcat log `/usr/local/tomcat/logs/catalina.out`: 
     141  Can't find resource for bundle java.util.PropertyResourceBundle, key resp_label_with_different_resp_values_html_error 
     144I searched for the internationalization properties files in the webapp 
     146grep -lrsi resp_label /usr/local/tomcat/webapps/OpenClinica/ 
     148I found the default file at `/usr/local/tomcat/webapps/OpenClinica/WEB-INF/classes/org/akaza/openclinica/i18n/`  
     149and edited it with a text editor to add the `resp_label_with_different_resp_values_html_error` key: 
     151resp_label_with_different_resp_options=RESPONSE_OPTIONS_TEXT can not be different for the same RESPONSE_LABEL. Error on row 
     152resp_label_with_different_resp_values=REPONSE_VALUES can not be different for the same RESPONSE_LABEL. Error on row 
     153resp_label_with_different_resp_values_html_error=REPONSE_VALUES can not be different for the same RESPONSE_LABEL. Error on row 
     157You may also want to read about query debugging at our PostgreSql page.