You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sergey Snovsky <se...@provide.net> on 2001/11/20 19:56:00 UTC

Tomcat on Linux

Hello!

I'd like to ask some advice on how to best run Tomcat on Linux -- how can I make Tomcat start 
at the init time (possibly using chkconfig or something similar) and how do I make Tomkat run as the Tomcat user/group -- what files under Tomcat distribution should be owned by whom?

Thank you very much for any help!

Sergey

Re: Tomcat on Linux

Posted by Mika Goeckel <mi...@stepstone.de>.
Hi Sergey,

you can use "sudo -u tomcat /path-to-the-dist-dir/bin/startup.sh" to start
the instance up as another user. However, this restricts the ports to above
1024, because other than apache, tomcat does not have the feature to start
up as root, gain the socket for port 80 and change the user afterwards.

What sort of linux do you use?

On redhat, you could write a sh script, put it into /etc/init.d and link
from the appropriate runlevel /etc/rc.d/rc3.d to have it called.

Don't forget to set the classpath and path appropriate.

Cheers, Mika

----- Original Message -----
From: "Sergey Snovsky" <se...@provide.net>
To: <to...@jakarta.apache.org>
Sent: Tuesday, November 20, 2001 7:56 PM
Subject: Tomcat on Linux


Hello!

I'd like to ask some advice on how to best run Tomcat on Linux -- how can I
make Tomcat start
at the init time (possibly using chkconfig or something similar) and how do
I make Tomkat run as the Tomcat user/group -- what files under Tomcat
distribution should be owned by whom?

Thank you very much for any help!

Sergey



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Tomcat on Linux

Posted by Paul DuBois <pa...@snake.net>.
At 1:56 PM -0500 11/20/01, Sergey Snovsky wrote:
>Hello!
>
>I'd like to ask some advice on how to best run Tomcat on Linux -- 
>how can I make Tomcat start
>at the init time (possibly using chkconfig or something similar) and 
>how do I make Tomkat run as the Tomcat user/group -- what files 
>under Tomcat distribution should be owned by whom?
>
>Thank you very much for any help!
>
>Sergey

Install the RPM files as root:

# rpm --install tomcat4-4.0.1-1.noarch.rpm
# rpm --install tomcat4-webapps-4.0.1-1.noarch.rpm

The first RPM contains the server software, the second contains the
applications that are installed by default for the other distribution formats.
The installation process will create a new user "tomcat4" to be used for
running Tomcat.  (It also creates a tomcat4 group.)

Then edit /etc/tomcat4/conf/tomcat4.conf to set JAVA_HOME to the pathname
of your Java SDK.

Change directory into /etc/rc.d/init.d.  You'll find a script "tomcat4"
that can control Tomcat's startup at boot time.  It needs to be activated:

# chkconfig --add tomcat4

If you like, use the tomcat4 script to start up Tomcat manually:

# ./tomcat4 start

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>