Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've tried to install tomcat5.5 on ubuntu 7.10 using Synaptic, I also checked the webadmin feature and the webapps package for tomcat, and installed anything else it prompted me to as dependancies
Synaptic goes and downloads whatever it needs, then tries to install and I'm presented with the following error message...
I too have tried to install Tomcat5.5 on Ubuntu 7.04, with the same result. Looking around the various etc and usr directories, I think Tomcat has indeed been installed, but as the messages indicate, there is a problem with post-installation configuration, meaning the startup script that was written to init.d has errors that make Tomcat fail to start up. It is not listed as a service. So I came here hoping for help in fixing the script. There was some mention of Tomcat5.5 being intended for a java version beyond 1.4, which is what Ubuntu seems to be running, so I am going to check on that part of it - but let me know if you get a fix before I can come back with mine ;-)
Okay, here is what I'm seeing:
In /etc/init.d/tomcat5.5, the startup script as I understand, the JAVA_HOME variable is not being set, because the lines:
# Look for the right JVM to use
for jdir in $JDK_DIRS; do
if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
JAVA_HOME_TMP="$jdir"
# checks for a real JDK like environment, needed to check if
# really the java-gcj-compat-dev package is installed
if [ -r "$jdir/bin/jdb" ]; then
JAVA_HOME="$JAVA_HOME_TMP"
fi
fi
done
export JAVA_HOME
do not find a directory in $JDK_DIRS that contains /bin/jdb. For me, the closest value in $JDK_DIRS (which is set near the top of the script) was /usr/lib/jvm/java-gcj .
So it looks to me as if the fix is to find the real location of the jdk, as evidenced by the presence of both a /bin/java and a /bin/jdb directory, and put that into $JAVA_HOME in the /etc/default/tomcat5.5 script file.
I have looked all through the usual suspects and cannot find a /bin directory with both of those subdirectories, so I'm stuck. Any ideas on where the jdk got installed on Ubu7.04?
Last edited by islandBilly; 12-28-2007 at 12:07 PM.
Progress: I have found the right value to give JAVA_HOME in /etc/default/tomcat5.5:
/usr/lib/jvm/java-gcj
Let me point out that I am running Eclipse 3.2, and what I did was go into /etc/eclipse/java_home and see what it was running. The top choice was the one above, which I knew from a lot of previous searching actually exists on my machine. Once I put it into the default file, the startup script ran. :-)
BUT even though it starts, Tomcat does not show up in the Services box as a service, and it doesn't process a jsp. When I ran /etc/inti.d/tomcat5.5 status, it said Tomcat is not running.
One more thing: after Tomcat seemed to start but not run, I re-installed sun-6-jdk. Then I found that the /usr/lib/jvm/java-6-sun-1.6.0.00/bin directory contained the mysterious jdb, as well as java and javac; so I made that the JAVA_HOME. That resulted in an error, so on a hunch I took away the bin part, and just made JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.00/
That has resulted in the now-familiar behaviour that tomcat starts ok, but is not running when you go check status. So what does it take to get tomcat to run??
Final bit: today, when I booted up, Tomcat started working! Honestly, I don't know why. The only change I made since last entry was to get rid of the gcj java in Eclipse and replace it with java-sun-6. That made ant start working properly. But what made Tomcat start working, or rather, why it didn't start working before, I do not know.
Now I just need to figure out where my connect/J jar file went!
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408
Rep:
Just wanted to let you know that if you check ubuntuforums you will find a nice tutorial about installing tomcat. It says that there is a problem with the tomcat available in the synaptics. In that tutorial they show how to install the latest version of tomcat and jre from the binary files available in sun website. Unfortunately I have not bookmarked the address, but a quick search on google should direct you to the tutorial.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.