For oc3 alpha http://clinicalresearch.wordpress.com/2009/06/08/openclinica-3-0-features-preview-part-i/
OpenClinica 3 Alpha Quick Install on Fedora
Note: this has been used only for testing a newer OS in preparation for expected features of Red Hat Enterprise Linux 6 (OpenJDK, Tomcat6, postgresql 8.3). We are not using Fedora in production. See OpenClinica for Red Hat Enterprise Linux 5 Update 3 (EL5.3) install.
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 OpenClinica installed on a fully updated install of in a short amount of time.
1. Download and install software.
1a. Install prerequisite software
# install Java separately first because there are multiple options (Sun, IBM, BEA) yum -y install java-1.6.0-openjdk-devel yum -y install postgresql-server tomcat6-admin-webapps rpm -q java-1.6.0-openjdk-devel postgresql tomcat6 # java-1.6.0-openjdk-devel-1.6.0.0-20.b14.fc11.i586 # postgresql-8.3.7-1.fc11.i586 # tomcat6-6.0.18-9.2.fc11.noarch
1b. Download and extract OpenClinica for Linux
First we'll set up links so that both Red Hat's default OS tools and OpenClinica install.txt instructions will work. In short the downloads will live in /usr/local/oc/ while the live webapp and data will be visible as /usr/local/tomcat/ but really live in /var/lib/tomcat5/ per Linux Standard Base (LSB).
mkdir /var/lib/tomcat6/openclinica.data chown tomcat:tomcat /var/lib/tomcat6/openclinica.data ln -s /var/lib/tomcat6/openclinica.data /usr/share/tomcat6 ln -s /usr/share/tomcat6 /usr/local/tomcat mkdir /usr/local/oc
Next Register at OpenClinca.org and get OpenClinica 2.5.4 (02/17/2009), or browse for the latest version at the OpenClinica Downloads website.
Upload 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/.
Now, on your host, decompress the download :
cd /usr/local/oc tar zxvf OpenClinica-*.tar.gz
Make sure you only have one /usr/local/oc/OpenClinica-* directory or some of the commands below will fail. If you have older versions of OpenClinica you can move them to an oldversions/ directory.
2. Setup software
2a. PostgreSQL
Prepare a strong password to use for the db user and run the following:
/etc/init.d/postgresql initdb /etc/init.d/postgresql start chkconfig postgresql on # change localhost access type to "md5" sed -i 's;127.0.0.1/32 ident sameuser;127.0.0.1/32 md5;' /var/lib/pgsql/data/pg_hba.conf # switch to postgres user (these command take the place of create_user_and_db.sql script) su - postgres createuser --no-superuser --no-createrole --no-createdb --pwprompt clinica # type a strong password and note it! createdb --encoding UTF8 --owner clinica openclinica # # bug: # http://www.openclinica.org/pipermail/developers/2009-January/000519.html svn co http://svn.akazaresearch.com/openclinica/OpenClinica/trunk/src/main/config/database/PostgreSQL/SNAPSHOT/install/ . for i in create_database_SNAPSHOT_tables_with_data.sql create_database_SNAPSHOT_functions.sql create_oc_qrtz_tables.sql ; do psql openclinica < $i; done exit /etc/init.d/postgresql restart # test the connection from the command line -- type your strong password psql --user clinica --host 127.0.0.1 openclinica
2b. Tomcat
Below are several small Tomcat configuration changes, bugfixes, and workarounds:
# set tomcat to start automatically on boot chkconfig tomcat6 on
By default, Tomcat is not configured for encrypted (HTTPS) requests. If you want to pass requests through an Apache httpd server, see ApacheConfig for details. Alternatively you can configure Tomcat to serve SSL requests by editing /etc/tomcat/server.xml. First uncomment the Connector port="8443" section, then 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/local/tomcat/ service tomcat6 start # verify it is now running netstat -anp |grep 8443 # tcp 0 0 :::8443 :::* LISTEN 581/java
2c. OpenClinica Deployment
# pre-deploy the WAR; we will edit some files before restarting Tomcat cp /usr/local/oc/OpenClinica-*/distribution/OpenClinica.war /usr/local/tomcat/webapps
Finally, make a copy of the default datainfo.properties file and edit with your settings:
# change OpenClinica settings /usr/local/tomcat/webapps/OpenClinica/properties/datainfo.properties rsync -vaz /usr/local/tomcat/webapps/OpenClinica/WEB-INF/classes/datainfo.properties oc3-datainifo.orig rsync -vaz /usr/local/tomcat/webapps/OpenClinica/WEB-INF/classes/datainfo.properties my-datainfo.properties sed -i 's;password=clinica;password=MYSTRONGPASS;' my-datainfo.properties sed -i 's;smtpHost=mail.*;smtpHost=localhost;' my-datainfo.properties sed -i 's;adminEmail=.*;adminEmail=you@your.domain;' my-datainfo.properties rsync -vaz my-datainfo.properties /usr/local/tomcat/webapps/OpenClinica/WEB-INF/classes/datainfo.properties /usr/local/tomcat/webapps/OpenClinica/properties/datainfo.properties /etc/init.d/tomcat6 restart
Now 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.
