(On Slackware 12.2 at 2010-04-28)
Tomcat is available as package at www.slackpackages.net. Installing the package adds the user and group 'tomcat' with a user- and group ID of 8080. /etc/rc.d./rc.tomcat
and /etc/profile.d/catalina.sh
and catalina.csh
, which creates the CATALINA_HOME
env. var.
Tomcat is controlled with /etc/rc.d./rc.tomcat start|stop|restart
. Make rc.tomcat runnable and enable autostart at power on by starting/stopping it with an entries in rc.local
/ rc.local_shutdown
. (See comments in rc.tomcat)
After start you should see the default Tomcat home page at http://localhost:8080/ If not, check /usr/share/apache-tomcat/RUNNING.txt
The CATALINA_HOME
env var points to /usr/share/apache-tomcat
Hypertext docs live in subdirs of $CATALINA_HOME/webapps
. The default home page is $CATALINA_HOME/webapps/ROOT/index.html
. It has pointers to Servlets Examples, JSP Examples and the Tomcat Documentation. Access the default home page at http://localhost:8080/ .
Static HTML can be served by simply creating a subdir in $CATALINA_HOME/webapps
and providing an index.html
within that new dir. (Tested)
A WAR file (eg. from apache click) can be deployed just by dropping it into $CATALINA_HOME/webapps
Note that Tomcat extracts the .war file into the webapps dir and serves content from the extracted directory and not from the war file. More
Tomcat ships with a web based configuration app. Among, others it can be used to reload newly compiled web apps (eg. java classes) without restarting the server.
In order to access the manager, you have to create a rolename called manager
, add some user and assign him the magnager
role in
$CATALINA_HOME/conf/tomcat-users.xml
. More
<tomcat-users> <!-- Add the following 2 lines: --> <role rolename="manager"/> <user username="bigboss" password="geheim" roles="manager"/> </tomcat-users>
tomcat-users.xml
by default is world readable. You may want to restrict access to the tomcat
user only
How to encrypt the password?