jenkins the definitive guide

(Jeff_L) #1

Chapter 3. Installing Jenkins


3.1. Introduction


One of the first things you will probably notice about Jenkins is how easy it is to install. Indeed, in
less than five minutes, you can have a Jenkins server up and running. However, as always, in the real
world, things aren’t always that simple, and there are a few details you should take into account when
installing your Jenkins server for production use. In this chapter, we look at how to install Jenkins onto
both your local machine and onto a fully fledged build server. We will also look at how to take care
of your Jenkins installation once it’s up and running, and how to perform basic maintenance tasks such
as backups and upgrades.


3.2. Downloading and Installing Jenkins


Jenkins is easy to install, and can run just about anywhere. You can run it either as a stand-alone
application, or deployed on a conventional Java application server such as Tomcat or JBoss. This first
option makes it easy to install and try out on your local machine, and you can be up and running with
a bare-bones installation in a matter of minutes.


Since Jenkins is a Java application, you will need a recent version of Java on your machine. More
precisely, you will need at least Java 5. In fact, on your build server, you will almost certainly need the
full features of the Java Development Kit (JDK) 5.0 or better to execute your builds. If you’re not sure,
you can check the version of Java on your machine by executing the java -version command:


$ java -version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)

Jenkins is distributed in the form of a bundled Java web application (a WAR file). You can download
the latest version from the Jenkins website (http://jenkins-ci.org—see Figure 3.1, “You can download
the Jenkins binaries from the Jenkins website”) or from the book website. Jenkins is a dynamic project,
and new releases come out at a regular rate.


For Windows users, there is a graphical Windows installation package for Jenkins. The installer comes
in the form of a ZIP file containing an MSI package for Jenkins, as well as a setup.exe file that
can be used to install the .NET libraries if they have not already been installed on your machine. In
most cases, all you need to do is to unzip the zip file and run the jenkins-x.x.msi file inside (see
Figure 3.2, “Jenkins setup wizard in Windows”). The MSI installer comes bundled with a bundled JRE,
so no separate Java installation is required.

Free download pdf