If you were thinking of trying to use CentOS 5.2’s tomcat packages: don’t. You just get a silent 400 Bad request error on the holding page for no reason. Download it from upstream, and use that directly. It’s very poorly documented, sadly, so to get started:
- Install the Sun JRE and set $JAVA_HOME appropriately - gcj is … lacking
- Grab the Tomcat ‘core’ tarball and unpack it in place
- edit conf/tomcat-users.xml to add a user that has the ‘manager’ role
- start Tomcat with ./bin/startup.sh
- Go to http://yourhost:8080/ and log in to “status” with the manager user you added
- This will list any of the apps you installed (by dumping their .war file in webapps/)
I also set up a virtual host with Apache (for OpenGrok) like this:
<VirtualHost *.80>
ServerName grok.example.org
ProxyPreserveHost On
ProxyPass / http://example.org:8080/
ProxyPassReverse / http://example.org:8080/
</VirtualHost>