Changes between Initial Version and Version 1 of OpenclinicaLucid


Ignore:
Timestamp:
05/04/10 10:42:14 (9 years ago)
Author:
joshuadf
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenclinicaLucid

    v1 v1  
     1= OpenClinica Quick Install on Ubuntu Lucid = 
     2 
     3See OpenClinica for current install. 
     4 
     5This "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 in a short amount of time. 
     6 
     7== 1. Download and install software. == 
     8 
     9=== 1a. Install prerequisite software === 
     10{{{ 
     11 
     12}}} 
     13 
     14 
     15=== 1b. Download and extract OpenClinica for Linux === 
     16 
     17First we'll set up links so that both Red Hat's default OS tools and OpenClinica install.txt instructions will work.  
     18In short the downloads will live in `/usr/local/oc/` while the live webapp and data will be visible as `/usr/local/tomcat/` 
     19but really live in `/var/lib/tomcat6/` per Linux Standard Base (LSB). 
     20{{{ 
     21mkdir /var/lib/tomcat6/openclinica.data 
     22chown tomcat5:adm /var/lib/tomcat6/openclinica.data 
     23ln -s /var/lib/tomcat6/openclinica.data /usr/share/tomcat6 
     24ln -s /usr/share/tomcat6 /usr/local/tomcat 
     25mkdir /usr/local/oc 
     26}}} 
     27 
     28Next [http://www.openclinica.org/register.php Register at OpenClinca.org] and get [http://www.openclinica.org/entities/entity_details.php?eid=496&parentid=445 OpenClinica 2.5.4 (02/17/2009)], or browse for the latest version at the [http://www.openclinica.org/page.php?pid=40 OpenClinica Downloads] website. 
     29 
     30Upload 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/`. 
     31 
     32Now, on your host, decompress the download : 
     33{{{ 
     34cd /usr/local/oc 
     35tar zxvf OpenClinica-*.tar.gz  
     36}}} 
     37 
     38Make sure you only have one `/usr/local/oc/OpenClinica-*` directory or some of the commands below will fail. 
     39If you have older versions of OpenClinica you can move them to an `oldversions/` directory. 
     40 
     41== 2. Setup software == 
     42 
     43=== 2a. PostgreSQL === 
     44 
     45Prepare '''a strong password''' to use for the db user and run the following: 
     46 
     47{{{ 
     48/etc/init.d/postgresql start 
     49chkconfig postgresql on 
     50# change localhost access type to "md5"  
     51sed -i 's;127.0.0.1/32          ident sameuser;127.0.0.1/32          md5;' /var/lib/pgsql/data/pg_hba.conf 
     52# switch to postgres user        
     53su - postgres 
     54  createuser --no-superuser --no-createrole --no-createdb --pwprompt clinica 
     55  # type a strong password and note it! 
     56  createdb openclinica  
     57  psql -d openclinica -f /usr/local/oc/OpenClinica-*/config/database/PostgreSQL/*/install/create_database_*_tables_with_data.sql 
     58exit 
     59/etc/init.d/postgresql restart 
     60# test the connection from the command line -- type your strong password  
     61psql --user clinica --host 127.0.0.1 openclinica 
     62}}} 
     63 
     64=== 2b. Tomcat === 
     65 
     66Below are several small Tomcat configuration changes, bugfixes, and workarounds:  
     67 
     68{{{ 
     69# set tomcat to start automatically on boot 
     70chkconfig tomcat6 on 
     71 
     72# install postgresql JDBC driver per OpenClinica instructions 
     73cp /usr/local/oc/OpenClinica-*/config/libraries/postgresql-8.1-405.jdbc3.jar /usr/local/tomcat/lib/ 
     74}}} 
     75 
     76By default, Tomcat is not configured for encrypted (HTTPS) requests. If you want to 
     77pass requests through an Apache httpd server, see ApacheConfig for details. Alternatively you 
     78can [http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html configure Tomcat to serve SSL requests]  
     79by editing `/etc/tomcat/server.xml`. First uncomment the `Connector port="8443"` section,  
     80then create a keystore with a self-signed certificate for Tomcat: 
     81{{{ 
     82keytool -genkey -alias tomcat -keyalg RSA -dname "cn=Mark Jones, ou=JavaSoft, o=Sun, c=US" -storepass changeit -keypass changeit 
     83mv /root/.keystore /usr/local/tomcat/ 
     84 
     85service tomcat6 start 
     86# verify it is now running 
     87netstat -anp |grep 8443 
     88# tcp        0      0 :::8443                     :::*                        LISTEN      581/java             
     89}}} 
     90 
     91 
     92=== 2c. OpenClinica Deployment === 
     93 
     94{{{ 
     95# pre-deploy the WAR; we will edit some files before restarting Tomcat 
     96cp /usr/local/oc/OpenClinica-*/distribution/OpenClinica.war /usr/local/tomcat/webapps  
     97}}} 
     98 
     99Lastly, 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 
     100{{{ 
     101# change OpenClinica settings 
     102sed -i 's;smtpHost=mail.example.com;smtpHost=localhost;' /usr/local/tomcat/webapps/OpenClinica/properties/datainfo.properties 
     103sed -i 's;adminEmail=.*;adminEmail=you@your.domain;' /usr/local/tomcat/webapps/OpenClinica/properties/datainfo.properties 
     104/etc/init.d/tomcat5 restart 
     105}}} 
     106 
     107Now 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. 
     108