Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jul 2005 07:52:11 +0100 (BST)
From:      Jan Grant <Jan.Grant@bristol.ac.uk>
To:        Bryan Maynard <bryan.maynard@reallm.com>
Cc:        FreeBSD Java <freebsd-java@freebsd.org>
Subject:   Re: Tomcat locked down
Message-ID:  <Pine.GSO.4.62.0507140741341.25574@mail.ilrt.bris.ac.uk>
In-Reply-To: <200507131229.32287.bryan.maynard@reallm.com>
References:  <200507131229.32287.bryan.maynard@reallm.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 13 Jul 2005, Bryan Maynard wrote:

> I know this is a simple thing. . . ;-)
> 
> I installed Tomcat 5.0.30 from the ports and just entered: make install clean.
> 
> Tomcat seems to run fine, but i can't do anything with it! My user account 
> "Bryan", but Tomcat runs under user "www" so I have to either go to a 
> terminal or log into KDE as root to do anything with Tomcat. Aside from being 
> annoying, the problem with this is that I've also installed sysdeo tomcat 
> plugin for eclipse. When I am logged in a root, I can start, stop, and 
> restart Tomcat just fine. But when I'm logged in as Bryan no such luck. I've 
> tried running Eclipse under "root", but I get an su error when I try that.
> 
> I also cannot drop webapps nto the webapps forder. This is a problem because I 
> am using Apache Axis and need to put Axis' stuff (jars and such) in the 
> webapps folder. I can't keep switching back and forth between root and Bryan, 
> and certainly can't do all my dev work as root!
> 
> I know there's a simple solution to all this, I just don't know what it is! 
> Thanks for all your help. . .

For development, I run my "own" tomcat, based on the port installation.
Make a ~/tomcat directory, with the following subdirectories:
	conf
	logs
	temp
	work
	webapps
(These are sufficientl if you're only doing webapp development and don't 
need to add files to tomcat's shared or common classpaths)

Copy the configuration directory contents from the port install into 
conf; edit as you will. You may also wish to copy the manager webapp 
into the webapps directory.

Finally you'll need a startup/shutdown script. I use something like this 
(which is in ~/tomcat/tomcat)

[[
#!/bin/sh

CATALINA_HOME=/usr/local/jakarta-tomcat5.0
CATALINA_BASE=/home/jan/tomcat
JAVA_OPTS="-Xss4m -Djava.awt.headless=true"
JAVA_HOME=/usr/local/jdk1.4.2

export CATALINA_HOME CATALINA_BASE
export JAVA_OPTS JAVA_HOME

cd "$CATALINA_BASE"
exec "$CATALINA_HOME"/bin/catalina.sh $1
]]

Run this and you'll own your own development tomcat instance, running 
under your own userid. Once you're at a point where you want to deploy, 
you can package stuff up and drop it into the "main" tomcat webapps 
folder, if you so desire.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44 (0)117 9287088 or 3317661   http://ioctl.org/jan/
It's a sad fact that the word "semantics" seems to have lost all meaning.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.62.0507140741341.25574>