Friday, July 13, 2007

Feisty + Tomcat5.5 HowTo

I got the following off of the Ubuntu Forums, and include it here so I know where it is, for next time. (Yes, there's always a next time.) In particular, #2 solved my present issue of not being able to restart Tomcat via the /etc/init.d/ script.

Thanks to Emblem Parade for this:

Argh. So, if you tried installing tomcat5.5 from the repositories, you may have noticed that it's broken. You get a configuration error about JAVA_HOME not being set. Actually, there are three problems! Here's what you can do to get it to work:

1) Install

sudo aptitude install sun-java6-jdk tomcat5.5

(Note that you absolutely need the JDK, not just the JRE.)

2) Set Tomcat's default JAVA_HOME

sudo gedit /etc/default/tomcat5.5

Uncomment the JAVA_HOME line and set it to your JDK path. For Java 6 installed from the repositories, it's as so:

JAVA_HOME=/usr/lib/jvm/java-6-sun

3) Fix catalina.out

Unfortunately, it seems that Tomcat's log file is set to be a pipe, but Tomcat can't seem to start with it. We'll recreate it as a regular file with the same security settings:


cd /var/log/tomcat5.5/
sudo rm catalina.out
sudo touch catalina.out
sudo chown tomcat55:nogroup catalina.out
sudo chmod uo-wrx catalina.out


Tomcat should work now as a daemon. Start it like this:

sudo /etc/init.d/tomcat5.5 start

And point your browser at http://localhost:8180/

Hooray!

Labels:

0 Comments:

Post a Comment

<< Home