Setting jvm (CATALINA_OPTS) for yum installed tomcat

I'm Ito, an infrastructure engineer.
When you install Tomcat using yum, catalina.sh is not created, and the tomcat daemon is registered instead.
If you install Tomcat from source instead of using yum, you can start and stop it with catalina.sh,
allowing you to specify JVM startup options there.
So what about yum?
Set in tomcat.conf
If you installed Tomcat using yum,
various configuration files will be located in /etc/tomcat8 (for Tomcat 8).
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 helpful,please give it a "Like"!
1
