. . .

Configure Tomcat Extras

Native Libraries

The tomcat native libs improve performance a bit. As root execute:

aptitude install libapr1 libaprutil1 libapr1-dev libssl-dev make
export JAVA_HOME=/opt/jdk
cd /opt/aom-yambas/temp
tar zxvf ../bin/tomcat-native.tar.gz
cd tomcat-native*/jni/native
./configure --with-apr=/usr/bin/apr-1-configure
make
make install
ln -s /usr/local/apr/lib/libtcnative-1.so /usr/lib/libtcnative-1.so

After tomcat restart, the following log message should appear in catalina.out:

INFO: Loaded APR based Apache Tomcat Native Library 1.1.120

More info: http://tomcat.apache.org/native-doc/

Running tomcat on port 80/443

Runing tomcat on elevated ports requires some special setup:

sudo apt-get install authbindsudo touch /etc/authbind/byport/80sudo chown aom-yambas: /etc/authbind/byport/80sudo chmod 755 /etc/authbind/byport/80sudo nano /etc/apiomat/aom-yambas

=> AUTHBIND=yes

Changing allocated Heap Size of Tomcat Service

Since ApiOmat 2.4.7 the Tomcat service will allocate 70% of the system RAM. To change the heap size of your Tomcat service simply adjust the minimum and maximum values within the Tomcat configuration.
It's recommended to set the minimum and maximum of the heap size to the same value (for more information see official Tomcat documentation):

...
JAVA_OPTS="${JAVA_OPTS} -Xms<INSERT_YOUR_NEW_HEAP_SIZE_HERE_IN_MBYTE>m"
JAVA_OPTS="${JAVA_OPTS} -Xmx<INSERT_YOUR_NEW_HEAP_SIZE_HERE_IN_MBYTE>m"
...

Open C:/tomcat8/bin/tomcat8w.exe switch to java tab and change the minimum and maximum values of the memory pool:

images/download/attachments/14615116/tomcat7w_options.png

Keep in mind that the initial and maximum values of the memory pool will overwrite the -Xmx and -Xms values within the Java options.