Changes between Initial Version and Version 1 of OpenclinicaFedora


Ignore:
Timestamp:
05/08/09 13:42:54 (9 years ago)
Author:
joshuadf
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenclinicaFedora

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