This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Install Tomcat without root? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Install Tomcat without root?" Watch "Install Tomcat without root?" New topic
Author

Install Tomcat without root?

Ht Tse
Greenhorn

Joined: Sep 15, 2009
Posts: 1
I am new to Tomcat. I need more guidance and help. Currently, I don't have the root access to my Linux server. The make command is not available. How do I install Tomcat on my Linux server?

My goal is to allow my Java desktop application to ask for some data from Tomcat. Then, Tomcat will ask the database, which will provide the data to Tomcat. At last, Tomcat will give the data to my Java desktop application.

I really need to study detailed installation steps and need to read more blog posts and forum posts to get familiar with Tomcat. Please give some suggestions.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Ht Tse wrote:I am new to Tomcat. I need more guidance and help. Currently, I don't have the root access to my Linux server. The make command is not available. How do I install Tomcat on my Linux server?

I'm not familier with Linux, So I can't help yopu much, but I can search this :
How do I install Tomcat on my Linux server?

Ht Tse wrote:My goal is to allow my Java desktop application to ask for some data from Tomcat. Then, Tomcat will ask the database, which will provide the data to Tomcat. At last, Tomcat will give the data to my Java desktop application.

Tomcat doesn't get you any database access, you have to write a web app for the same.

Ht Tse wrote:I really need to study detailed installation steps and need to read more blog posts and forum posts to get familiar with Tomcat. Please give some suggestions.

As I said, Google. I'm sure there are plenty of resource on web.


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
James Ward
Ranch Hand

Joined: Apr 27, 2003
Posts: 263
Download Tomcat 'Zip' from here:

http://tomcat.apache.org/download-60.cgi
http://apache.tradebit.com/pub/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.zip

Unzip it in whichever dir on linux you have access to.
Make sure you have JAVA_HOME environment variable pointing to a JDK.

cd to <TOMCAT_HOME>/
catalina.sh run

You are ready.
If it has started succsfully, you can access tomcat on: http://yourhost:8080
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950
    
  19

You don't need root access to install Tomcat in Linux, and you should NOT run Tomcat as root, for security reasons. As long as you don't reassign any of Tomcat's ports down below the magic line (port 4096), you don't need to run as root.

The Tomcat zip file has no absolute filepaths in it, so where you install it (and even what OS you install it under!) are of no importance.

Of course, from a sysadmin's point of view, there are some "preferred" places and some of them may require temporary root permission to unzip into. Historically, /usr/local is popular, but Tomcat has some writable directories in it, and according to the LSB, /usr is supposed to be read-only these days. You can get around this by strategically configuring CATALINA_HOME and CATALINA_BASE. Or you can use one of the alternative choices which are less regulated. /opt used to be good, but these days, /srv is probably better.

For personal use, just plunk Tomcat somewhere under your home directory.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Install Tomcat without root?
 
Similar Threads
Installer with supporting applications
Deployment on a Linux server
hosting J2ee application
Apache and Tomcat Installation
Tomcat setup on Linux