• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Install Tomcat without root?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic