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:
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.
Figure 3-4. Starting Jenkins using Java Web Start
Once you have Jenkins running, connect to this server and go ...