How to setup tomcat on fedora?

I am new to linux I want to setup tomcat 6 on fedora 64 bit. i some how managed to install tomcat by using following command

yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps

but i don't at which directory tomcat installed. also i want to know how i can configure JAVA_HOME and CATALINA_HOME environment variables.


Solution 1:

On Fedora 13 a CATALINA_HOME environment variable is not explicitly defined following a Tomcat 6 install. It is essentially equal to /usr/share/tomcat6/ though. This threw me off when reading Tomcat 6 guides that routinely refer to a CATALINA_HOME. You could add one to your ~/.bash_profile if it helps.

CATALINA_HOME=/usr/share/tomcat6/
export CATALINA_HOME

You will have to log out and back in for this to take effect.

Solution 2:

JAVA_HOME and CATALINA_HOME should have been set up as part of the tomcat yum install.

You should find that:

  • starting and stopping can be done through the service command (eg, type "service tomcat6 start" in the terminal to start tomcat)
  • config is located at: /etc/tomcat6

full directory location summary:

Where things are stored by default in Fedora 11:
================================================
Tomcat 6.x
----------
/etc/tomcat6                configuration files     $CATALINA_HOME/conf
/usr/share/java/tomcat6     libraries               $CATALINA_HOME/lib
/usr/share/tomcat6/bin      executables             $CATALINA_HOME/bin
/var/log/tomcat6            logs                    $CATALINA_HOME/logs
/var/cache/tomcat6/temp     temporary files         $CATALINA_HOME/temp
/var/lib/tomcat6            tomcat home directory   $CATALINA_HOME
/var/lib/tomcat6/webapps    web applications        $CATALINA_HOME/webapps
/var/cache/tomcat6/work     compiled servlets       $CATALINA_HOME/work
================================================

source: http://forums.fedoraforum.org/showpost.php?s=2a288eb3e937b3f46e7a788513cd1032&p=1364649&postcount=5

Solution 3:

    sudo find / -name "apache-tomcat*"

you might or might not need sudo.

You can just download the zip and put it wherever you want, you know...