SmallWorld Documentation for Future Developer: Difference between revisions

From DISI
Jump to navigation Jump to search
(Created page with "Written by Jennifer Young on April 23, 2019 ==Install and Set Up on TomCat== ===Step 1: Check the CentOS version and Java version === SmallWorld currently runs on n-9-22, whi...")
 
Line 45: Line 45:


==Modifying the SmallWorld GUI==
==Modifying the SmallWorld GUI==
The files for the SmallWorld WebApp live in
    /opt/tomcat/webapps/sw-ws
Edit the files in
    /opt/tomcat/webapps/sw-ws/WEB-INF
To add the link to go to ZINC from the SmallWorld results page, edit the swsearch.js JavaScript file
    /opt/tomcat/webapps/sw-ws/WEB-INF/static/swsearch.js

Revision as of 23:44, 23 April 2019

Written by Jennifer Young on April 23, 2019

Install and Set Up on TomCat

Step 1: Check the CentOS version and Java version

SmallWorld currently runs on n-9-22, which runs CentOS 6.10. You can check the version of CentOS with the following command:

   cat /etc/centos-release

Check your current version of Java with the following command:

   java -version

If you do not have the correct version, install it using yum. Follow the steps on this tutorial https://www.itzgeek.com/how-tos/linux/centos-how-tos/install-apache-tomcat-7-0-on-rhel-6-centos-6.html

Step 2: Create Tomcat Service Account

This must be done as a root user and has already been done for n-9-22.

   groupadd tomcat
   mkdir /opt/tomcat
   useradd -g tomcat -d /opt/tomcat tomcat

Step 3: Create Initialization Script to Control Apache TomCat

Download the latest version of Apache TomCat from the website https://tomcat.apache.org/download-90.cgi

   vi /etc/init.d/tomcat9

Copy the bash script from here https://www.itzgeek.com/how-tos/linux/centos-how-tos/install-apache-tomcat-7-0-on-rhel-6-centos-6.html

How to Restart the TomCat Server

   service tomcat9 restart

Set Environment Variable for Anonymous Graphs for TomCat

The file to modify is

   opt/tomcat/bin/catalina.sh

Add the following command to the top of the file (below the comments at the top_

   export SWDIR=/srv/db4

Modifying the Amount of Memory Allocated to SmallWorld

The memory allocated to TomCat is found in

   /opt/tomcat/bin/catalina.sh

Add the following commands to the top of the file (below the comments at the top)

   export CATALINA_OPTS="$CATALINA_OPTS -Xms80g"
   export CATALINA_OPTS="$CATALINA_OPTS -Xmx80g"
   export CATALINA_OPTS="$CATALINA_OPTS -XX:MaxPermSize=70g"

Modifying the SmallWorld GUI

The files for the SmallWorld WebApp live in

   /opt/tomcat/webapps/sw-ws

Edit the files in

   /opt/tomcat/webapps/sw-ws/WEB-INF

To add the link to go to ZINC from the SmallWorld results page, edit the swsearch.js JavaScript file

   /opt/tomcat/webapps/sw-ws/WEB-INF/static/swsearch.js