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., http://domain.com:8080/hudson) 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.

POST INSTALLATION:

to use Unix security, you may need to:

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

One Response to “ “Hudson CI + Tomcat 5.5 install on CentOS 5.5”

  1. sreedhar says:

    This site is excellent for Hudson-Installation in LINUX-Environment on TOMCAT-Server

Leave a Reply