Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Installing Tomcat 7 on Ubuntu 12.04

DZone's Guide to

Installing Tomcat 7 on Ubuntu 12.04

· Java Zone
Free Resource

Learn how to troubleshoot and diagnose some of the most common performance issues in Java today. Brought to you in partnership with AppDynamics.

This post is about installing Apache Tomcat7 on Ubuntu 12.04. Before this installation make sure java is installed in your machine. You can refer this post if you haven't done that already.
  1. Download Tomcat 7 tar.gz binary distribution from here.
  2. Unpack it using following command.
        tar xvzf apache-tomcat-7.0.29.tar.gz   
  3. Move it to a more appropriate location using following command.
        sudo mv apache-tomcat-7.0.29/ /usr/share/tomcat7  
  4. Open up /usr/share/tomcat7/bin/catalina.sh file using following command
        gedit /usr/share/tomcat7/bin/catalina.sh   
  5. Add following two lines in there after the first line.
    JAVA_HOME="/usr/lib/jvm/jdk-6u32"  
    JRE_HOME="/usr/lib/jvm/jdk-6u32/jre"
  6. Open up /usr/share/tomcat7/conf/tomcat-users.xml and uncomment user and role entries there. Then add a manager-gui role and a user by adding following lines there.
        <role rolename="manager-gui"/>  
        <user username="pavithra" password="tomcat" roles="manager-gui"/>  
  7. Start the Tomcat server using following command.
        sudo /usr/share/tomcat7/bin/catalina.sh run  
  8. Verify Tomcat installation using the following URL.
        http://127.0.0.1:8080/  
  9. To login as the manager, use the following URL, provide the relevant username and password.
        http://127.0.0.1:8080/manager/html  

Understand the needs and benefits around implementing the right monitoring solution for a growing containerized market. Brought to you in partnership with AppDynamics.

Topics:

Published at DZone with permission of Pavithra Gunasekara, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}