Setting jvm (CATALINA_OPTS) for yum installed tomcat

I'm Ito, an infrastructure engineer.
If you install Tomcat with yum, catalina.sh will not be created and the tomcat daemon will be registered.

If you install Tomcat from source instead of using yum, it will be started and stopped using catalina.sh, so
you can add JVM startup options here.

So what about yum?

Set in tomcat.conf

If you installed Tomcat using yum,
various configuration files will be located in /etc/tomcat8 (for Tomcat8).

Just specify it here as "CATALINA_OPTS"

# vi /etc/tomcat8/tomcat8.conf CATALINA_OPTS="-Xmx128M -Xms64M"

Once configured, restart Tomcat

tomcat 5785 155 1.6 2618264 131800 ? Sl 07:20 0:04 /usr/bin/java -Xmx128M -Xms64M -classpath :/usr/share/tomcat8/bin/bootstrap.jar:/usr/share/tomcat8/bin/tomcat-juli.jar: -Dcatalina.base=/usr/share/tomcat8 -Dcatalina.home=/usr/share/tomcat8 -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat8/temp -Djava.util.logging.config.file=/usr/share/tomcat8/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start

The settings in CATALINA_OPTS are reflected, such as "/usr/bin/java -Xmx128M -Xms64M~~"

If you found this article useful, please click [Like]!
1
Loading...
1 vote, average: 1.00 / 11
5,086
X Facebook Hatena Bookmark pocket

The person who wrote this article

About the author