Version 20 (modified by 9 years ago) ( diff ) | ,
---|
OpenSpecimen HowTo Install
Tags: OpenSpecimen HowTo
See https://openspecimen.atlassian.net/wiki/display/CAT/Deployment+steps
- Have to make install.sh and catalina.sh executable.
- Have to amend apache config:
- Amend
loadmodule.conf
to:... # Tomcat - used for JBoss #LoadModule jk_module /usr/lib64/apache2/mod_jk.so # Proxy to divert to the JBoss Application Server LoadModule proxy_module /usr/lib64/apache2-prefork/mod_proxy.so LoadModule proxy_http_module /usr/lib64/apache2-prefork/mod_proxy_http.so
- Amend
httpd.cong
to... # Proxy to provide access to the JBoss Application Server ProxyPass / http://localhost:8280/ timeout=180 ProxyPassReverse / http://localhost:8280/ ProxyTimeout 180 # Use mod_jk to forward to JBoss - not used now, cos it broke # Include /local/apache2/etc/mod.d/mod_jk.conf ...
- Amend
Notes from watching Nitesh upgrade our dev version
- Our customisations are in the file
/local/os_v20/app/plugin-dir/os-le-1.0.0.jar
. This file can be copied between installations. - He copied the build zip file (linked in the page above) into the directory
/local/os_v20/installable
and unzipped it. cd
into the newly unzipped folder.- `chmod 744 install.sh
- Run:
nohup ./install.sh -dhost localhost -dport 3306 -dname {db name} -duser {db user name} -dpass {db password name} -dtype mysql -ahome /local/{Open Specimen Directory}/app -ahost localhost -aport 8280 -adtype fresh -adatadir /local/{Open Specimen Directory}/app/os-data -aplugindir /local/{Open Specimen Directory}/app/plugin-dir &
- Run
cp /local/{Open Specimen Directory}/installable/os-le-1.0.0.jar /local/{Open Specimen Directory}/app/plugin-dir
- Create the script
run_open_specimen.sh
:
#!/bin/bash unset JAVA_TOOL_OPTIONS export JAVA_ROOT=/usr/lib64/jvm/java export JDK_HOME=/usr/lib64/jvm/java export SDK_HOME=/usr/lib64/jvm/java export JAVA_BINDIR=/usr/lib64/jvm/java/bin export JRE_HOME=/usr/lib64/jvm/java/jre JAVA_HOME=/opt/java JRE_HOME=/opt/java/jre OPEN_SPECIMEN_DIR=/local/{Open Specimen Directory}/app export JAVA_TOOL_OPTIONS=-XX:CompressedClassSpaceSize=10m export JAVA_OPTS="-Xmx2G -XX:-UseCompressedClassPointers" $OPEN_SPECIMEN_DIR/bin/catalina.sh start >$OPEN_SPECIMEN_DIR/logs/tomcat-start.log 2>$OPEN_SPECIMEN_DIR/logs/tomcat-start.err &
- Create the script
stop_open_specimen.sh
:
#!/bin/bash unset JAVA_TOOL_OPTIONS export JAVA_ROOT=/usr/lib64/jvm/java export JDK_HOME=/usr/lib64/jvm/java export SDK_HOME=/usr/lib64/jvm/java export JAVA_BINDIR=/usr/lib64/jvm/java/bin export JRE_HOME=/usr/lib64/jvm/java/jre JAVA_HOME=/opt/java JRE_HOME=/opt/java/jre OPEN_SPECIMEN_DIR=/local/openSpecimen_v2_4/app export JAVA_TOOL_OPTIONS=-XX:CompressedClassSpaceSize=10m export JAVA_OPTS="-Xmx2G -XX:-UseCompressedClassPointers" $OPEN_SPECIMEN_DIR/bin/catalina.sh stop
- Give
www-run
account permission to run the scripts:
setfacl -m u:wwwrun:rx /local/{Open Specimen Directory}/run_open_specimen.sh setfacl -m u:wwwrun:rx /local/{Open Specimen Directory}/stop_open_specimen.sh
- Give
www-run
permission to write to the logs and work directories:
setfacl -R -m u:wwwrun:rwx /local/{Open Specimen Directory}/app/logs/ setfacl -R -m u:wwwrun:rwx /local/{Open Specimen Directory}/app/work/
- Give
www-run
and yourself (go on, treat yourself) permission to run Tomcat:chmod 774 /local/{Open Specimen Directory}/app/bin/catalina.sh setfacl -m u:wwwrun:rx /local/{Open Specimen Directory}/app/bin/catalina.sh
- Then
run_open_specimen.sh
as yourself. You need to do this to be able to unpack the WAR file. The site will not come up successfully because there is a bug or somesuch in the database upgrade scripts.
- Nitesh changed one of the change sets because it fails if you don't. Hurray.
- The file is
/local/{Open Specimen Directory}/app/webapps/openspecimen/WEB-INF/classes/db/2.0/schema.xml
- Change
<changeSet author="vlonushte" id="FK on domain name of users table">
to<changeSet author="vlonushte" id="FK on domain name of users table" failOnError="false">
- The file is
UPDATE WORKFLOW table to correct format
Run the command:
update os_cp_workflows set workflows = '[{"name":"registerParticipant","view":"plugin-ui-resources/le/collect-specimens.html","ctrl":"leRegAndCollectSpecimensCtrl","data":{"boxOpts":{"dimension":{"rows":8,"columns":12},"compact":false}}}]';
New Process
cd /local
- Unzip the release
unzip openSpecimen_v2_4.zip
cd openSpecimen_v2_4
- Run install.sh
sudo -u wwwrun ./first_run_open_specimen.sh
- Check for process still running
ps -ef|grep cat
- If the process is still running, kill it using
sudo -u wwwrun kill {process id}
sudo -u wwwrun ./run_open_specimen.sh
- Check it starts by running
tail -f app/logs/catalina.out
Note:
See TracWiki
for help on using the wiki.