Here's how you can install Tomcat:
Go to Apps in the control panel and create a new 'custom app listening on port' application. Make a note of the port number assigned to the app. You can name the app whatever you want - in this example, let's name it 'tomcat'.
Go to Sites in the control panel and create a site to serve the app you created in step 1.
SSH into your server and run the following commands:
if [ "
uname -i" = "x86_64" ]; then JRE_HOME=/usr/lib/jvm/jre-1.6.0-openjdk.x86_64; else JRE_HOME=/usr/lib/jvm/jre-1.6.0-openjdk; fi
echo "export JRE_HOME=$JRE_HOME" >> ~/.bashrc
tar zxf ~/apache-tomcat-7.0.25.tar.gz --strip 1
~/webapps/tomcat/conf/server.xml to change connector port 8080 to the port assigned to your custom app.
You can then start Tomcat by running:
Once Tomcat is running, you should see the "If you're seeing this, you've successfully installed Tomcat. Congratulations!" page when you visit the site you created in step 2.
You can stop it by running:
Note: I don't actually know much about Tomcat other than the steps above. Some things that you might need to work out further:
server.xml has definitions for a lot of ports other than the HTTP connector port - you might need to create additional 'custom app listening on port' applications to reserve ports for those purposes. My basic server seemed to work fine without them.
These steps will get you only a bare Tomcat server - you'll still need to deploy your own code and do whatever else you need to get your site up and running.
Jun 19 '11 at 09:44