Installing and Configuring Tomcat 7
Overview
Documents downloading, installing, and configuring tomcat.
Details
Download and install tomcat and the tomcat apps as Linux packages.
It is recommended that you run tomcat as a user other than the default tomcat7 user so that admin tasks which change the indexes. To enact this, consider the following configuration changes.
Change where CATALINA_PID goes so that it is writeable by this user (applies to /etc/init.d/tomcat7 as well as /etc/tomcat7.conf, depending on your environment).
Set permissions of the tomcat installation to the new user (assumes "ihtsdo" user)
NOTE: the tomcat user should be able to start/stop the server with "/usr/sbin/tomcat7 start/stop". If not, you may need to edit /etc/init.d/tomcat7 a little in a custom way for your system. If the process was started by root, it will likely have to be killed by root first.
Tomcat must be configured to pass "run.config" environment variable to the application:
One way to do this is to invoke the java command with -Drun.config=/home/ihtsdo/data/config.properties
(e.g. edit this in /usr/share/tomcat7/conf/tomcat7.conf and add to JAVA_OPTS or in /etc/init.d/tomcat7 - this may vary depending on your system)Also add -Xmx2500M to JAVA_OPTS as well.
NOTE: development environments must also be configured as such
Tomcat may be configured to support POST requests of size > 2MB
Edit server.xml and add maxPostSize="50000000" to each <Connector> element.
Tomcat must be configured to support following of links. Make sure any Context tags in the configuration contain allowLinking="true".
Edit context.xml to add this parameter to the Context tag.
References
Copyright © 2025, SNOMED International