Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

Continuous integration with Hudson

Open source CI server offers easy setup and configuration

  • Print
  • Feedback

Page 3 of 7

The Tomcat installation will prompt you to select install options. Be sure to select Custom options and then Service, as shown in Figure 2, so that Tomcat will run as a service.

Tomcat installation options

Figure 2. Tomcat installation options

Next, select a directory where you want to install Tomcat, as shown in Figure 3. I highly recommend that you pick a directory with no spaces. You can thank me later.

Selecting an installation directory

Figure 3. Selecting an installation directory

Now the installer will ask you which port you want to listen on. The default is port 8080, which is probably fine; just make sure that you do not have another application using that port. If you do, Tomcat will not start properly. You will also be asked to provide a Tomcat administrator username and password. All this is shown in Figure 4.

Selecting a listening port and administrative user name and password

Figure 4. Selecting a listening port and administrative user name and password

The installer will then ask you to provide the location of the Java JRE you have installed. As you can see in Figure 5, I used Sun Java 1.6.0_07.

Selecting a Java JRE to run Tomcat

Figure 5. Selecting a Java JRE to run Tomcat

Once you click Install, the installation should run to completion and the service will start running. You can make sure that Tomcat is operating correctly by pointing your Web browser to http://localhost:8080 (substituting the appropriate name or IP address for localhost if you aren't using a Web browser running on the computer where Tomcat is installed). The Web page displayed should look something like the screenshot in Figure 6.

Verifying Tomcat installation and operation

Figure 6. Verifying Tomcat installation and operation

Now, to install Hudson, copy the hudson.war file to the webapps subdirectory of your Tomcat installation directory. If you used the same install directory shown in Figure 3, this would be C:\Tomcat6\webapps. Tomcat will hot-deploy WAR files, but the easiest thing to do now is restart Tomcat. There are two ways to do this. The first is to open a DOS shell and enter the following commands:

 C:\Tomcat6>net stop Tomcat6
    C:\Tomcat6>net start Tomcat6

The second option is to open the Services applet. This applet can be found in the Administrative Tools group in the Control Panel, which can be located by clicking the Start button on the Windows toolbar, then selecting Settings and then Control Panel. In the Services applet, locate the service named Apache Tomcat and then click the Restart button. This is illustrated in Figure 7.

The Services applet

Figure 7. The Services applet

Hudson should now be installed. You can verify this by pointing your Web browser to http://localhost:8080/hudson. The main Hudson screen is shown in Figure 8.

The Hudson start page

Figure 8. The Hudson start page

That's all there is to it! If you're comfortable with an application development environment based on Windows XP and Tomcat, you're all set. If you prefer a system running JBoss and Ubuntu Linux, read on.

Installing Hudson: JBoss 4.2.3 on Ubuntu Linux 8.04 (Hardy Heron)

To install Sun Java 1.6 on Ubuntu, open a shell and execute the following command:

 sudo apt-get install sun-java6-jdk

When issuing a sudo command, you will be prompted to enter your password.

  • Print
  • Feedback

Resources

Downloads

  • Get the latest Hudson WAR file here or here.
  • Download apache-tomcat-6.0.18.exe to install Tomcat on your Windows machine. Download JBoss 4.2.3.GA for a Linux environment (look for the file named jboss-4.2.3.GA.zip).
  • Ant is the build tool used for examples in this article.
  • jboss-init.sh enables the automatic start and stop of the JBoss server.
  • If your Hudson server cannot connect to outside resources, you can download the plugins you need from the Hudson Website.

Learn more

More from JavaWorld