I'm running tomcat 5x on Red Hat 7.2 and Red Hat 9.  The tomcat binary comes with a 
script at:
 
$CATALINA_HOME/bin/catalina.sh
 
To run tomcat as a service, create a script, let's call it 'tomcatservice', and put it 
at:
 
/etc/init.d/tomcatservice
 
Make it executable, keep it owned by root.  Assume you are going run tomcat as user 
'myuser'.  Install tomcat, which just amounts to untarring it, and moving it where you 
want it.  Change owner on the directory to myuser, eg.
 
chown -R myuser:myuser jakarta-tomcat-5.0.9
chmod -R 750 jakarta-tomcat-5.0.9
 
Then your 'tomcatservice' script will contain something like:
 
JAVA_HOME=/usr/java/j2sdk1.4.0_01
export JAVA_HOME
 
cd $CATALINA_HOME/bin
su myuser -c "./catalina.sh $*"
 
Then put a link to tomcatservice at:
 
cd /etc/rc3.d
 
as follows:
 
ln -s /etc/init.d/tocmatservice SNNtomcatservice
 
where NN is a number not already taken by the other links in that directory.  To kill 
tomcat, add:
 
ln -s /etc/init.d/tocmatservice KNNtomcatservice
 
S for start, K for kill.  Links in  /etc/rc3.d will be called automatically if you 
come up in text mode in linux.  If you start up in gui mode, do the same but go to 
/etc/rc5.d instead.  You might want to do both.
 
I call tomcat using port 8080, so I am not sure about your question regarding port 80.
 
One thing to look out for, is that RHL 8 and 9 are missing a library needed by Tomcat, 
libstdc++-libc6.1-1.so.2.  I had to get it from RHL 7.2 and copy it to /usr/lib on RHL 
9 to get Tomcat to run.

        -----Original Message----- 
        From: Joao Medeiros [mailto:[EMAIL PROTECTED] 
        Sent: Sun 9/28/2003 12:42 PM 
        To: 'Tomcat Users List' 
        Cc: 
        Subject: Tomcat on Linux
        
        

        Hi folks,
        
        I've decided to start doing some testing on Tomcat under Linux for which
        I have installed Redhat 8 which is now up and running, downloaded the
        JSDK for Linux which is also setup and downloaded the Tomcat files but
        before I go ahead and start installing it I was wondering if you could
        help me out determining a few things:
        
        - Shall I create a new user, i.e. 'Tomcat' and install the server under
        it or shall I just put it under ROOT? I know that if I do choose to
        install it under a different user other than ROOT I'll have to setup
        special execute permissions so the server can run on port 80 for
        instance...
        
        - I read somewhere that in order for Tomcat to run as a daemon one will
        have to use the jsvc tool. Has anyone got any experience in doing it?
        
        TIA,
        /JM
        
        
        
        
        ---------------------------------------------------------------------
        To unsubscribe, e-mail: [EMAIL PROTECTED]
        For additional commands, e-mail: [EMAIL PROTECTED]
        
        
        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to