Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Is there a proper way to run more than one tomcat instance on an Ubuntu server?

I've done some searching and found two options:

  1. Download a zipped tomcat and manually deploy it. The obvious con is that it won't be upgraded using apt-get.
  2. Use some advanced scripting, which is dangerous in a production server.

Any other ideas to cleanly run another instance?

Thanks in advance,


share|improve this question
why do you need more than one instance? – cupakob Nov 14 '10 at 10:57

3 Answers 3

up vote 2 down vote accepted

Scripting seems to be the best solution because defaut ubuntu server configuration is for one instance only.

As you noticed, you must update Tomcat manually, but this is not necessary a problem because, often your Java applications depend on a particular JDK version so upgrade process must be done carefully especially on a production server.

share|improve this answer

Have you considered configuring several webapps directories instead of running multiple tomcat instances?

Of course there are cases where you really need multiple instances but in case of serving same application separately for multiple hosts, you may do it by adding multiple declarations in server.xml:

  <Host name="" appBase="host1"
    unpackWARs="true" autoDeploy="true" 
    xmlValidation="false" xmlNamespaceAware="false" />

  <Host name="" appBase="host2"
    unpackWARs="true" autoDeploy="true" 
    xmlValidation="false" xmlNamespaceAware="false" />

Now you may create "/var/lib/tomcat6/host1" and "/var/lib/tomcat6/host2" directories and deploy WAR files to them.

share|improve this answer

One way you can do it is by using GNU Screen . But, if you need to run them as services that auto-start using the Init system, then you need to script it using "nohup" and "&" .

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.