Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure Tomcat as a service (no catalina.bat)

Tags:

tomcat

I install Tomcat as a service using the installer from Apache website. I don't have catalina.bat in my bin folder. How can I set the permgem memory size? Any recommended size to set?

like image 773
user903772 Avatar asked Jun 09 '12 16:06

user903772


2 Answers

You have to use tomcatXw.exe (where X is your major Tomcat version) to configure the service: there are places to configure all JVM options, there.

like image 114
Christopher Schultz Avatar answered Sep 23 '22 01:09

Christopher Schultz


To Configure Tomcat's Java_OPT in catalina,
First of all in Installer adaddition of tomcat, you never find out catalina file in bin Folder.

To set parameters you have to use tomcate property(use tomcatXw.exe to open that)
Giving little idea how to set param in property file.

In catalina file:(write something like this)

JAVA_OPTS="-Djava.awt.headless=true -Xms2048m -Xmx4048m -XX:NewSize=1024m -XX:MaxNewSize=2048m -XX:PermSize=1024m -XX:MaxPermSize=2048m -XX:+DisableExplicitGC"

In Tomcate Property file:(add your parameter in Java options: same as in picture)

enter image description here

like image 26
Jubin Patel Avatar answered Sep 22 '22 01:09

Jubin Patel