Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Troubleshooting with apache Tomcat 7 steps should be followed ....

after downloading apache-Tomcat 7 // open terminal go to that downloading file folder in which tar.gz file is still.

Untar the tar file

  • tar -xzvf filename.tar.gz

    move a extracted directory of apache-Tomcat7 in current path

  • sudo mv Directory_Name(Extracted eg.apache-Tomcat 7.0.32) /usr/local/Tomcat7

to set environment variable for Tomcat7

  • sudo nano /usr/local/Tomcat7/bin/

then Nano editor will open ..

 JAVA_HOME =/usr/lib/jvm/java-6-sun
 export CATALINA_OPTS="$CATALINA_OPTS -Xms128m -Xmx1024m -XX:MaxPermSize=256m

after hit ctrl+X to save file

  • to set the role and username and password.

sudo nano /usr/local/Tomcat7/conf/./tomcat-users.xml

<role rolename="manager-gui" />
<role rolename="manager-script" />
<role rolename="manager-jmx" />
<role rolename="manager-status" />
<user username="admin" password="admin" roles="manager-gui,manager-script,manager-jmx,manager-status"/>

Ctrl+X to save file

  • If Port no confliction comes in a way then open file to change the port no.

sudo nano /usr/local/Tomcat7/conf/./server.xml

then change the connector port as you want....

share|improve this question
Welcome to askubuntu, I've fixed the formatting for you, but it looks to me like you should have most of your question posted as an answer to your initial question. – Jorge Castro Apr 29 '11 at 4:45

11.10 or later

sudo apt-get install tomcat7

or the really easy way:

Install via the software center

share|improve this answer
This doesn't work for me on Natty – Paul Gregoire Mar 16 '12 at 14:36
@Mondain: Yup, tomcat7 first landed in oneiric. – tumbleweed Mar 19 '12 at 12:27
Its certainly confusing for newbies. I just used the tar.gz from apache and it works as expected. – Paul Gregoire Mar 19 '12 at 15:38

Tomcat 7 is available for Precise and Oneiric

Backports for Natty are here:

deb natty main deb-src natty main

share|improve this answer

Tomcat generally doesn't need to be "installed" . Just unzip it and go. Most of the time there is no need for any configuration to get it going out-of-the-box. Of course, once you start adding .war apps and other things, then configuration is needed, mostly in the server.xml file.

share|improve this answer

Why is the installation description different from the above way of installation and the way it is described in the Tomcat Setup page( at the tomcat site under the title Unix daemon.

share|improve this answer
I asked the question because I install Tomcat as described here <…; and I can't figure out what is the reason for different descriptions – Varuna Apr 25 '12 at 20:06

Good explaination is available at:

For All Tomcat Versions.

share|improve this answer
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Eliah Kagan Jun 13 '12 at 11:10

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.