Search code examples
tomcatrhelsetenv

RHEL7 Tomcat setenv.sh


I wanted to use setenv.sh in RHEL7 tomcat7 standard installation. However, the file is not used. I created it in /usr/share/tomcat/bin. But as there are no more script files in this directory, I suppose its probably not the right place. What works is to set my values directly in /usr/sbin/tomcat file, but this file might be overwritten by a future update.


Solution

  • As @Eran Medan answered on https://serverfault.com/questions/139435/where-to-set-java-heap-options-e-g-xmx-for-tomcat-6-under-ubuntu-9-04, setenv.sh is not used under RHEL because the /usr/sbin/tomcat6 script is NOT calling catalina.sh but simply calls the tomcat bootstrap class directly.

    The best place is to put the values under /etc/tomcat6/tomcat6.conf As you mentioned, modifying /usr/sbin/tomcat is not the right way to do it.

    @Jdamian : You're right if you use a zip archive but Josef Vogt is using the tomcat package on red hat repository.