You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Dean A. Hoover" <dh...@rochester.rr.com> on 2003/05/07 06:56:14 UTC

installing tomcat via rpm

I am attempting to install tomcat via rpm thusly:

[root@falcon downloads]# rpm -iv tomcat4-4.1.24-full.2jpp.noarch.rpm
warning: tomcat4-4.1.24-full.2jpp.noarch.rpm: V3 DSA signature: NOKEY, 
key ID 307a10a5
Preparing packages for installation...
tomcat4-4.1.24-full.2jpp

Don't forget to setup vars in /etc/tomcat4/tomcat4.conf to
adapt the RPM to your configuration.
Also edit/create /etc/java/java.conf to define your default JDK

For security purposes, tomcat4 service is installed
but not activated by default.
use your service installer for such purposes
ie: ntsysv


However, I do not understand what I am supposed to do
to the above-mentioned files. Are there more complete
instructions somewhere? Since I did not understand what
to do, I did nothing. I am running RH9 and went to the
KDE Services menu and "started" tomcat, apparently
successfully. However, when I go to localhost:8080 in
my browser, it does not connect. Any help out there?

Dean Hoover


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: installing tomcat via rpm

Posted by wi...@mclachlan.com.au.
On Wed, May 07, 2003 at 07:10:31AM -0400, Dean A. Hoover wrote:

> For curiosity sake I then ran
> service tomcat4 start
> which responded with:
> Starting tomcat4: process allready running
> 
> Now I'm really confused.

I get this message too when I try and start tomcat4.

I can't see any jdk process running and certainly no processes
by user tomcat. I also deleted the tomcat pid file from /var/run
but it still tells me there are processes running.

Wilson

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


File logging in virutal host

Posted by Leon Kwan <le...@icon.com.hk>.
Dear all,

    I would like to ask a question about the file logging in virtual 
host. As you can see in the section of the server.xml at the bottom of 
the mail. I have set several things:
Under virtual host of abc,
    org.apache.catalina.logger.FileLogger          logs/abc/ul_log.X.txt
    org.apache.catalina.logger.SystemErrLogger     logs/abc/ul_stderr.X.txt
    org.apache.catalina.logger.SystemOutLogger     logs/abc/ul_stdout.X.txt
    the access log                                 
logs/abc/ul_access_log.X.txt
Under this virtual host, there is a Root context with the logging
    org.apache.catalina.logger.FileLogger          
logs/abc/root/ul_log.X.txt
    org.apache.catalina.logger.SystemErrLogger     
logs/abc/root/ul_stderr.X.txt
    org.apache.catalina.logger.SystemOutLogger    
 logs/abc/root/ul_stdout.X.txt

However, I found that it cannot capture the std error and std out, 
neither under logs/abc or logs/abc/root. i.e. when I output some info in 
JSP of this virtual host to the stdout or stderr, I cannot find any file 
storing those info.  May I know is there anything go wrong?
Originally, I have set in the registry that the Tomcat service will 
write the stderr and stdout to a specific file. But now I have removed 
those 2 values in the registry and restart the service again and I am 
sure no these 2 files are created anymore.
My main purpose here is just to separate the std err and std out amongst 
each virtual host.

BTW, what is the difference between FileLogger and SystemOutLogger?
According to the manual:
    FileLogger: records all logged messages to disk file(s)
    SystemOutLogger: records all logged messages to whatever stream the 
standard output of Catalina is pointed at
what mean by disk file in FileLogger? I do not quite understand about it.

Here is the section of the server.xml:

<Host name="abc" debug="0" appBase="webapps/abc" unpackWARs="true" 
autoDeploy="true">
<!-- Logger shared by all Contexts related to this virtual host.  By
     default (when using FileLogger), log files are created in the "logs"
     directory relative to $CATALINA_HOME.  If you wish, you can specify
     a different directory with the "directory" attribute.  Specify either a
     relative (to $CATALINA_HOME) or absolute path to the desired
     directory.-->
    <Logger className="org.apache.catalina.logger.FileLogger" 
directory="logs/abc"  prefix="abc_log." suffix=".txt" timestamp="true"/>
    <Logger className="org.apache.catalina.logger.SystemErrLogger" 
directory="logs/abc" prefix="abc_stderr." suffix=".txt" timestamp="true"/>
    <Logger className="org.apache.catalina.logger.SystemOutLogger" 
directory="logs/abc" prefix="abc_stdout." suffix=".txt" timestamp="true"/>
    <Valve className="org.apache.catalina.valves.AccessLogValve" 
directory="logs/abc"  prefix="abc_access_log." suffix=".txt" 
pattern="common" resolveHosts="false"/>
    <Context path="" docBase="/" debug="0" reloadable="true" 
crossContext="true">
        <Logger className="org.apache.catalina.logger.SystemErrLogger" 
directory="logs/abc/root" prefix="abc_stderr." suffix=".txt" 
timestamp="true"/>
          <Logger className="org.apache.catalina.logger.SystemOutLogger" 
directory="logs/abc/root" prefix="abc_stdout." suffix=".txt" 
timestamp="true"/>
          <Logger className="org.apache.catalina.logger.FileLogger" 
directory="logs/abc/root" prefix="abc_log." suffix=".txt" timestamp="true"/>
    </Context>
    </Host>

-Thanks in advance
-Leon


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: installing tomcat via rpm

Posted by "Dean A. Hoover" <dh...@rochester.rr.com>.
Thanks, but I'm still in the dark on this. I forgot to mention that I am 
running
RH9 and JAVA_HOME and PATH are already set in /etc/profile. I am using the
KDE interface. On the menu, I go to System Settings->Server 
Settings->Services.
This runs the program redhat-config-services 0.8.4. Tomcat shows up as 
one of
the services that you can check. I check it and then tell it to run. It 
says it started
successfully. OK, then I go to http://localhost:8080 in my browser, 
which responds
with: The connection was refused when attempting to contact localhost:8080.

For curiosity sake I then ran
service tomcat4 start
which responded with:
Starting tomcat4: process allready running

Now I'm really confused.
Dean

Enrico Donelli wrote:

> Dean A. Hoover wrote:
>
>> I am attempting to install tomcat via rpm thusly:
>>
>> [root@falcon downloads]# rpm -iv tomcat4-4.1.24-full.2jpp.noarch.rpm
>> warning: tomcat4-4.1.24-full.2jpp.noarch.rpm: V3 DSA signature: 
>> NOKEY, key ID 307a10a5
>> Preparing packages for installation...
>> tomcat4-4.1.24-full.2jpp
>>
>> Don't forget to setup vars in /etc/tomcat4/tomcat4.conf to
>> adapt the RPM to your configuration.
>> Also edit/create /etc/java/java.conf to define your default JDK
>>
>> For security purposes, tomcat4 service is installed
>> but not activated by default.
>> use your service installer for such purposes
>> ie: ntsysv
>
>
>
> I think it's just saying that the package is correctly installed.
> You may need to edit /etc/java/java.conf to indicate the position of 
> your jdk, but, as long I remember,  if you set JAVA_HOME and PATH in 
> /etc/profile, you are ok.
>
> Now you should be able to start tomcat with
> service tomcat4 start
> and stop with
> service tomcat4 stop
>
> If you want automatic start/stop of the service at the boot/shutdown 
> of the server, you should create symbolic links from the dir 
> /etc/rc.d/rc3.d/ to /etc/rc.d/init.d/tomcat: if you don't know how to 
> make this, probably it's better if you use the tool suggested (ntsysv 
> ) or the tools supplied with your distrubution (redhat?) .
>
> Hope this helps
> Best regards
> Enrico
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: installing tomcat via rpm

Posted by Enrico Donelli <e....@logicom.it>.
Dean A. Hoover wrote:

> I am attempting to install tomcat via rpm thusly:
>
> [root@falcon downloads]# rpm -iv tomcat4-4.1.24-full.2jpp.noarch.rpm
> warning: tomcat4-4.1.24-full.2jpp.noarch.rpm: V3 DSA signature: NOKEY, 
> key ID 307a10a5
> Preparing packages for installation...
> tomcat4-4.1.24-full.2jpp
>
> Don't forget to setup vars in /etc/tomcat4/tomcat4.conf to
> adapt the RPM to your configuration.
> Also edit/create /etc/java/java.conf to define your default JDK
>
> For security purposes, tomcat4 service is installed
> but not activated by default.
> use your service installer for such purposes
> ie: ntsysv


I think it's just saying that the package is correctly installed.
You may need to edit /etc/java/java.conf to indicate the position of 
your jdk, but, as long I remember,  if you set JAVA_HOME and PATH in 
/etc/profile, you are ok.

Now you should be able to start tomcat with
service tomcat4 start
and stop with
service tomcat4 stop

If you want automatic start/stop of the service at the boot/shutdown of 
the server, you should create symbolic links from the dir 
/etc/rc.d/rc3.d/ to /etc/rc.d/init.d/tomcat: if you don't know how to 
make this, probably it's better if you use the tool suggested (ntsysv ) 
or the tools supplied with your distrubution (redhat?) .

Hope this helps
Best regards
Enrico





---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: installing tomcat via rpm

Posted by Jens Skripczynski <sk...@myrealbox.com>.
Dean A. Hoover:
> I am attempting to install tomcat via rpm thusly:
> 
> [root@falcon downloads]# rpm -iv tomcat4-4.1.24-full.2jpp.noarch.rpm
> warning: tomcat4-4.1.24-full.2jpp.noarch.rpm: V3 DSA signature: NOKEY, 
> key ID 307a10a5
> Preparing packages for installation...
> tomcat4-4.1.24-full.2jpp
 
> Don't forget to setup vars in /etc/tomcat4/tomcat4.conf to
> adapt the RPM to your configuration.
edit the file with your favourite editor
joe|vim|emacs|... /etc/tomcat4/tomcat4.conf

the standard install looks fine to me

> Also edit/create /etc/java/java.conf to define your default JDK
This file needs to contains a line with:
---
# Default jvm
JAVA_HOME=/path/to/jdk-dir
---

> For security purposes, tomcat4 service is installed
> but not activated by default.
> use your service installer for such purposes
> ie: ntsysv

> However, I do not understand what I am supposed to do
> to the above-mentioned files. Are there more complete
> instructions somewhere? Since I did not understand what
> to do, I did nothing. I am running RH9 and went to the
> KDE Services menu and "started" tomcat, apparently
> successfully. However, when I go to localhost:8080 in
> my browser, it does not connect. Any help out there?
For a howto I do not know.

I belief you need to get familiar with your linux os a bit more.
tomcat config files life under /etc/tomcat/* or /var/tomcat4/conf
For a start look at the 
- server.xml        
   setup for the server (specifiying connectors, listening port...
- tomcat.conf
   setting up the directories on your filesystem, so tomcat can run properly
- web.xml
   default values for your web-applications
- tomcat-users.xml
   you will need this file, if you will use the admin or manager application

All the files are well documented, just have a look at them.

For debugging the tomcat startup and why it does not responce take a look at
/var/log/tomcat4/ /var/tomcat4/logs/
- catalina.out
   This is the mainoutput by tomcat, if any errors happen on startup, you
   should be able to investigate them here.
- *.txt
   Also usefull, but I do not have a default install, so I do not know which
   files you have avaible.

Since you are using X, start 2 xterms (a,b):
- in a do 'tail -f /var/tomcat4/logs/catalina.out' (man tail)
- in b do (as root) 
   '/etc/rc.d/init.d/tomcat4 stop' to stop tomcat, in case it is running
   '/etc/rc.d/init.d/tomcat4 start'

In 'a' you should see everything, that is happening and any error that occurs.


Ciao

Jens Skripczynski
-- 
E-Mail: skripi-lists(at)myrealbox(dot)com

Ein Tag ohne Laecheln ist ein verlorener Tag.
                                -- Chalie Chaplin


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org