Best way to install Tomcat on Centos?

ScaredKitten

New Member
Messages
1
Reaction score
0
Points
0
I once did the mistake of installing tomcat while I had apache and php which made things very confusing. I want a way of safely installing Tomcat on my VPS and disabling Apache first

I am bored with php, so now I want to try something else :)
 

dfgo12

New Member
Messages
5
Reaction score
0
Points
1
I am using Tomcat with the S1 VPS package. There are a few things I would suggest.

1. Use the Sun JDK package rather than Open JDK. This saves about 80Mb of RAM which is useful.

2. You will need to set limits on Tomcat's JVM to stay within the available RAM. Edit the file '/etc/tomcat6/tomcat6.conf and set the line 'JAVA_OPTS' to something like this:

JAVA_OPTS="-Xminf0.1 -Xmaxf0.6 -Xms64m -Xmx64m -Xss128k -Xmn16m -XX:MaxPermSize=64m"'.

This limits the Heap (-Xmx) to 64Mb and the permgen memory (-XX:MaxPermSize) to 64Mb also. If you have a 1Gb allowance you can increase these values.

3. I use Apache as a front end to Tomcat as I find the server is more responsive when configured this way. You need to use the mod_jk package for Apache to do this. It's a bit complicated to set up but worth the effort.

Derek

'
 
Top