11

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/setenv.sh

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....

Jorge Castro
  • 73,717
Anupesh
  • 111

5 Answers5

5

11.10 or later

sudo apt-get install tomcat7

or the really easy way:

Install via the software center

tumbleweed
  • 8,106
2

Tomcat 7 is available for Precise and Oneiric https://launchpad.net/ubuntu/+source/tomcat7

Backports for Natty are here:

deb http://ppa.launchpad.net/tomcat7-ubuntu/backports/ubuntu natty main deb-src http://ppa.launchpad.net/tomcat7-ubuntu/backports/ubuntu natty main

Ringtail
  • 16,285
0

Why is the installation description different from the above way of installation and the way it is described in the Tomcat Setup page(http://tomcat.apache.org/tomcat-7.0-doc/setup.html) at the tomcat site under the title Unix daemon.

Varuna
  • 245
0

Good explaination is available at: http://clean-clouds.com/2011/10/19/install-tomcat-7-on-ubuntu/

For All Tomcat Versions.

Mits
  • 1
0

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.

djangofan
  • 3,874