Cover by John Ferguson Smart

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Installing Jenkins as a Windows Service

If you are running a production installation of Jenkins on a Windows box, it is essential to have it running as a Windows service. This way, Jenkins will automatically start whenever the server reboots, and can be managed using the standard Windows administration tools.

One of the advantages of running Jenkins on an application server such as Tomcat is that it is generally fairly easy to configure these servers to run as a Windows service. However, it is also fairly easy to install Jenkins as a service, without having to install Tomcat.

Jenkins has a very convenient feature designed to make it easy to install Jenkins as a Windows servers. There is currently no graphical installer that does this for you, but you get the next best thing—a web-based graphical installer.

First, you need to start the Jenkins server on your target machine. The simplest approach is to run Jenkins using Java Web Start (see Figure 3-4). Alternatively, you can do this by downloading Jenkins and running it from the command line, as we discussed earlier:

C:\jenkins> java -jar jenkins.war

This second option is useful if the default Jenkins port (8080) is already being used by another application. It doesn’t actually matter which port you use—you can change this later.

Starting Jenkins using Java Web Start

Figure 3-4. Starting Jenkins using Java Web Start

Once you have Jenkins running, connect to this server and go ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required