• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Problems installing and running Tomcat on Linux

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a Linux 7.1 machine. I downloaded an RPM
file from the apache site to my machine. This is
the "tomcat-3.3.3a-2.noarch.rpm" file.
First of all there is nothing in the documentation
that says that this version cannot be used. Hence
I installed this package with the command (as
mentioned in the tomcat docs):
rpm -Uvh tomcat-3.3.3a-2.noarch.rpm
The package got installed as I could check that
with the command:
rpm -qa | grep tomcat
The system responds with:
tomcat3-3.3a-2
However I don't know where the bin directory is
created from which I can start the shell file
to start tomcat. The directories were not created
under the install directory. They were all created
under /etc/tomcat3 but again I could not find a
bin file with the start shell files. The directory
tree was created as:
/etc/tomcat3/conf
..../apps-127.0.0.1.xml
..../apps-admin.xml
..../apps-examples.xml
..../jk
..../jserv
..../modules.xml
..../profile.xml
..../prof-server.xml
..../tomcat.conf
..../tomcat.policy
..../tomcat.policy
..../users
This is my first time working with tomcat so I
think I must have made some error in my installa-
tion. Could someone please help me. My machine is
an intel machine running Redhat Linux 7.1.

Thanks!

 
Saloon Keeper
Posts: 28486
210
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
Tomcat 4 installs to /var/tomcat4 - I'm not sure about tomcat 3, since I installed it from a tarball instead of an RPM.
try:
rpm -ql tomcat
(or whatever rpm thinks the ID of your installed tomcat 3 is). This will list all the files installed and where they were placed.
 
raza
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tim,
I will try the Tomcat 4.0 version. I wasn't sure if 4.0 was stable enough but seeing so many people using the 4.0 version on this forum, I will try that version and let you know.
Thanks very much for your tips!
\
Raza
 
Tim Holloway
Saloon Keeper
Posts: 28486
210
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
I was promoting Tomcat 4, but my most recent efforts have been with Tomcat 3. I use JOnAS as my EJB server (since I have multiple virtual hosts and JBoss/Tomcat 4 doesn't seem to support that). Unfortunately, JOnAS has only experimental support for Tomcat.
 
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tim:
Where did you get a tarball tomcat and how did you install it? Is tarball .tar.gz file?
Thanks.
Bruce
 
raza
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tim,
I tried the rpm files for the tomcat 4.0.1 release version. I unpacked them and installed these packages on my machine.
No luck again The only two directories that I saw being created were under /etc/tomcat4 and /var/tomcat4. Again the shell files for start and stop of the tomcat server were missing. As a matter of fact the whole bin directory was not created.
Maybe it is time to work with the tar files (Might as well get "tarred" I have also sent my question about installation of the RPM files to the user mailing list for the apache project. Some kind soul may help me out.
Much indebted to you also for your help. I will post if I get to the bottom of this problem.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you install using the tomcat rpm, the administrative scripts wind up in /usr/bin.
Look for something like tomcat4 or tomcat4.sh. They take single arguments such as run, start, stop, etc.
 
raza
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jon,
I looked under /usr/bin and could only find a file called "tomcat4". This file is an executable. There were no shell files. Running the "tomcat4" command prompts me for a password. Now I am totally lost. I used the "rpm -Uvh <rpm filename>" command as instructed by the docs. Jon, did you use different keys to install the tomcat4 packages?
However, I did copy over the zipped files for tomcat4 from the apache web site and untarred them in my home directory. This version of tomcat4 works on my machine. I would like to see the rpm file hiccups cleared up though.
Thanks!
Safdar
 
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I always get a Segmentation Fault error when trying to run Tomcat 4.0. I had no problems with 3.2.3 though. I'm running Mandrake 8.0 by the way. Can anyone help me with this? Thanks!
[ February 08, 2002: Message edited by: Paul Michael Laborte ]
 
Tim Holloway
Saloon Keeper
Posts: 28486
210
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
If you have a segfault on startup, try:
ulimit -s 1024
That's what it takes for WebLogic anyway.
----
The RPM install for Tomcat SHOULD have installed a set of .sh and .BAT files in /var/tomcat4/bin also made a "tomcat4" in /etc/init.d
Try:
tomcat4.sh start
and see if anything happens.
Under RedHat, the command
/sbin/service tomcat4 start
should also work.
The RPM didn't come with any sample webapps - I think they're in some other download. Or you can supply your own by placing the webapp jar file in /var/tomcat4/webapps and setting up a context in the /var/tomcat4/conf/serverl.xml file (make sure the option to "unjar" is set on).
 
Tim Holloway
Saloon Keeper
Posts: 28486
210
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
Insomnia can be a wonderful thing This is what I learned when I should have been sleeping:
If you're trying to run tomcat4, everywhere you read below that says "tomcat3" should be read as "tomcat4", but otherwise everything should be identical. (Except for the note at the bottom!)
I needed another Tomcat server for R&D so I downloaded the latest tomcat 3 RPM. Interesting files are:
/etc/init.d/tomcat3 (you have to do a "/sbin/chkconfig --add tomcat3" to make it start working on boot/init
/usr/bin/tomcat3, /usr/bin/dtomcat3 (direct tomcat) These are SCRIPT files. The "direct" tomcat script is called by the init.d service.
There is minimal error checking being done, so it can look like the startup succeeded but nothing works and a process status shows no Tomcat java tasks running. Look in /var/log/tomcat3/tomcat.log for useful info.
The most likely way it will fail is if it isn't referencing a usable JDK. Edit /etc/tomcat3/conf/tomcat3.conf to set this up. If you did an rpm install of the Sun JDK, it should be in /usr/java/jdk_xxx - where "xxx" is the version. You might want to do this
ln -s /usr/java/jdk_xxx /usr/java/jdk
and set tomcat.conf's JDK_HOME accordingly just to make it more version-independent.
When everything's configured right, you should be able to start Tomcat with a "/sbin/service tomcat3 start" command.
The one noteworthy difference for Tomcat 4 is that instead of "http://localhost:8080", you talk to it via "http://localhost:8180". Since they use different ports you have the freedom to run Tomcat 3 AND Tomcat 4 concurrently.
[ February 08, 2002: Message edited by: Tim Holloway ]
 
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I access tomcat4 on port 8080.
 
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's a paragraph in the install doc that tell you how to set the port it listens on - so you can run any number of webservers I guess.
 
Tim Holloway
Saloon Keeper
Posts: 28486
210
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
I believe the tarball version of tomcat4 was set to use 8080, but the rpm version uses 8180. It's set in server.xml
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic