Installing Hudson on Debian
This post describes how to setup the continuous integration tool Hudson on a Debian Linux system.
1. Update your /etc/apt/sources.list.
You definitely need the non-free components which include the official Sun Java packages. Therefore you should have a line like the follwing in your /etc/apt/sources.list:
deb http://ftp.de.debian.org/debian/ etch main non-free contrib
2. Install JRE and JDK 1.6
On a root shell, type:
apt-get install sun-java6-jre sun-java6-jdk
3. Configure Debian to use exactly this version as the system-wide default
On a root shell, type:
update-alternatives -–config java
update-alternatives -–config javac
4. Install Tomcat
On a root shell, type:
apt-get install tomcat5.5 tomcat5.5-admin tomcat5.5-webapps
5. Make Tomcat listen on port 8080
The default for Tomcat on Debian is to start on port 8180. We want it to start on port 8080. Thus, you need to change your /etc/tomcat5.5/server.xml. In the section
<Connector port=”8180″ maxHttpHeaderSize=”8192″
maxThreads=”150″ minSpareThreads=”25″ maxSpareThreads=”75″
enableLookups=”false” redirectPort=”8443″ acceptCount=”100″
connectionTimeout=”20000″ disableUploadTimeout=”true” />
you have to replace “8180″ by “8080″.
6. Disable Tomcat’s security mechanism
Hudson brings it’s own security management system. The Tomcat security mechanism for wepapps block the startup of Hudson and have to be in /etc/default/tomcat5.5 disabled. Search for “TOMCAT5_SECURITY” and change the line to make it look like this:
TOMCAT5_SECURITY=no
Instead, you should configure Hudsons internal security management system.
7. Setup a home directory for Hudson
In a root shell, type:
mkdir /home/hudson
chown tomcat55:nogroup /home/hudson
8. Set Hudson’s home directory environment variable
Open /etc/init.d/tomcat5.5 and add this line:
export HUDSON_HOME=/home/hudson
9. Deploy the hudson.war via the Tomcat Manager
After this step, you should be able to log into Hudson via Web browser and start configuring via the web interface.
10. Install Maven2
On a root shell, type:
apt-get install maven2
Setup your MAVEN_HOME environment variable. Open /etc/init.d/tomcat5.5 and add this line:
export MAVEN_HOME=/usr/share/maven2/
Create a Maven2 home directory for Hudson. This has to be located in /usr/share/tomcat5.5/.m2. Execute the following commands on a root shell:
mkdir /usr/share/tomcat5.5/.m2
chown tomcat55:nogroup /usr/share/tomcat5.5/.m2
11. Install ant and junit
On a root shell, type:
apt-get install ant ant-optional junit
Setup your ANT_HOME environment variable. Open /etc/init.d/tomcat5.5 and add this line:
export ANT_HOME=/usr/share/ant
12. Install SVN access plugin for Hudson
Open via http://localhost:8081/hudson/pluginManager/available in a web browser and choose SVNCompat14 Plugin for installation. Please note: For me, the install stopped with this exception at the first time:
javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1591) at …
But at the second try it ran through.
Tags: continuous integration, deb, debian linux system, java packages, Linux, sun java, tomcat, webapps
March 28th, 2009 at 2:25 pm
[...] already described the setup of the Continuous Integration server Hudson on Debian Linux. Our Hudson instance is available via internet: [...]
April 2nd, 2009 at 1:18 pm
[...] It took me several hours to set this up. The following steps assume that you have already installed Debian Linux, Maven2, Hudson as described here. [...]
June 14th, 2009 at 12:45 am
[...] http://www.manuelm.org/blog/?p=136 [...]