Install the latest Tomcat 7 on Ubuntu 12.04 - lifuzu/cafe GitHub Wiki

Prerequisite:

  1. Java installation - refer to: Install the latest Oracle JDK on Ubuntu

Process:

  1. Download the latest Tomcat package:

http://www.carfab.com/apachesoftware/tomcat/tomcat-7/v7.0.42/bin/apache-tomcat-7.0.42.tar.gz
  1. Run the following command to install it:

cd /usr/local; sudo tar -zxf ~/Downloads/apache-tomcat-7*.gz; \    
sudo ln -s /usr/local/apache-tomcat-7* /usr/local/tomcat
  1. Append PATH in ~/.bashrc and run it:

export CATALINA_HOME=/usr/local/tomcat
export PATH=${CATALINA_HOME}/bin:$PATH
  1. Activate the change:

source ~/.bashrc
  1. Start the tomcat service:

sudo /usr/local/tomcat/bin/startup.sh
  1. Open the following URL in a browser to verify:

http://localhost:8080/
  1. Startup tomcat after reboot
    /etc/init.d/tomcat

Configuration:

  • Manager-GUI
    Open up /usr/local/tomcat/conf/tomcat-users.xml, add a manager-gui role and a user by adding following lines there:

<role rolename="manager-gui"/>;
<user username="tomcat" password="tomcat" roles="manager-gui"/>;

Open the following URL in a browser to verify:


http://localhost:8080/manager
  • JMX
    TBD

References:

  1. http://java.dzone.com/articles/installing-tomcat-7-ubuntu
⚠️ **GitHub.com Fallback** ⚠️