Tomcat 7 on Mac OS X

Tomcat 7 install on Mac, super-easy. (Thanks to Wolf Paulus)

Download and unpack the latest Tomcat 7 binary directory and then:

sudo mv ~/Downloads/apache-tomcat-7.XX.XX /usr/local
sudo ln -s /usr/local/apache-tomcat-7.XX.XX /Library/Tomcat
sudo chown -R <your_username> /Library/Tomcat/
sudo chmod +x /Library/Tomcat/bin/*.sh



Super-basic tomcat app web.xml file

When setting up Tomcat, if you need some basic files for a ROOT app or similar or placeholder pages:

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns=""
  <display-name>Welcome to Tomcat</display-name>
     Welcome to Tomcat

This file is {TOMCATHOME}/webapps/ROOT/WEB-INF/web.xml and in the example above, home.jsp goes in the ROOT folder.

Hudson CI + Tomcat 5.5 install on CentOS 5.5

NOTE: some of this is out-of-date — you would use Tomcat 6+ and CentOS 6+, etc but most is still valid.

Hudson CI server is an easy-to-use continuous integration server that you can use for things like simple subversion updates to complex compile-and-build projects. The version control integration is one of the nice things about it — you get access to log messages and can browse and download your repo.

To install Hudson on CentOS 5.5 (or similar Linux disto) with Apache Tomcat 5.5 use:

yum install java-1.6.0-openjdk tomcat5 tomcat5-webapps tomcat5-admin-webapps

If you already have some or all of the above, you can skip the above and/or simply update. (I have not tried Hudson with Tomcat 6.)

For some reason (due to a previous Java install) I also needed to do:
yum reinstall geronimo-specs

Make sure the JVM for tomcat is 1.6[+] so you end up with:
Apache Tomcat/5.5[+] JVM Version: 1.6.0[+]

Then download .war file from Hudson, rename it “hudson.war” and put it into your Tomcat webapps directory, e.g., /var/lib/tomcat5/webapps/hudson.war

It should auto-install by going to your Tomcat URL/hudson (e.g., if you are using a standard Tomcat config. You will also need to set a Hudson home directory to a directory that the tomcat user has permissions to use (or make sure the default dir: /usr/share/tomcat5/.hudson is writable by tomcat user). I used a custom home by setting:

export CATALINA_OPTS="-DHUDSON_HOME=/home/tomcat/hudson/"

in the bottom of tomcat5.conf . To avoid warnings, also make sure to specify utf-8: <connector port="8080" URIEncoding="UTF-8"/> in server.xml.

These are the current CentOS/EPEL versions for 5.5, any upgrades to Tomcat (e.g., v6), and/or the JVM could change this. If you are lucky, you can be up and running in about 15 minutes. If you have problems (usually Java related), you could be in for a longer haul.


to use Unix security, you may need to:

sudo usermod -a -G root tomcat
sudo chmod g+r /etc/shadow