Get started Bring yourself up to speed with our introductory content.

Step by step Jenkins tutorial for beginners with examples

This step by step Jenkins tutorial for beginners demonstrates how easy it is to download and install Jenkins and get started with a continuous integration server.

Developers and operations professionals eager to participate in DevOps need to first download and install Jenkins....

In this step by step Jenkins tutorial for beginners, you'll find a step-by-step guide through your first build. When you've completed this install Jenkins tutorial, you'll be creating continuous integration jobs and be closer to DevOps expert status.

Download the Jenkins WAR file for Windows

To begin this step by step Jenkins tutorial, you must first download the product binaries.

There are a number of download options depending upon whether you want to install Jenkins on Windows, Linux or macOS. There's a Jenkins installation wizard for each option, which not only installs Jenkins but also registers the installation as a service on the local OS. The wizard does provide some extra steps that are helpful in production environments, but the best way for beginners to learn Jenkins is to choose the Generic Java package (.war) option. This option downloads a single file named jenkins.war, which is run on the command line.

This step by step Jenkins tutorial for beginners will use the jenkins.war file.

Step by Step Jenkins tutorial learning path

Part 1 -- Getting started with Jenkins tutorial (this one)

Part 2 -- Create a simple Jenkins build job: A CI tutorial for beginners

Part 3 -- Inject Jenkins environment variables into your builds

Part 4 -- Fix Jenkins plugin download errors

Part 5 -- Learn the importance of Maven Jenkins integration

Download jenkins.war.

Before you run Jenkins CI

The only prerequisite you need before using a Jenkins CI tool is to have the Java Development Kit (JDK) installed on your local machine. You'll need to configure the JAVA_HOME variable properly and include the bin directory of the JDK on the OS' path variable. Since Jenkins 2.54, the minimum JDK version is Java 8.

Choose a location to install Jenkins

After the download, the next step in our install Jenkins tutorial is to move the jenkins.war file out of the downloads folder and into a folder of your choice. Let's also make it easier to work with the CI tool once the installation is finished. So, copy the WAR file to a folder named _jenkins, which will reside directly under the root of the C:\ drive.

Move jenkins.war file into _jenkins.

Once the download's complete, the only thing you need to do to install Jenkins is run the jenkins.war file at the command line with the JDK's java utility: C:\_jenkins\java -jar jenkins.war.

The jenkins.war file has its own web-based runtime provided by an embedded Jetty servlet engine. This embedded runtime allows you to install Jenkins on your local machine without the need to preinstall a Jakarta Enterprise Edition-based web container, like Tomcat or Wildfly.

The first time Jenkins runs, configuration data is written and stored in a .jenkins subfolder under the user's profile. All of the Jenkins configuration data is stored in this folder, including information about Jenkins jobs and project workspaces. Since all of the runtime data created when you install Jenkins is stored under a local user's profile, multiple users on the same machine can have completely separate and completely independent Jenkins configurations.

Run jenkins.war from the command line.

When the Jenkins install is complete and the CI tool is ready for run, a message will appear in the command prompt window that says: "Info: Jenkins is fully up and running." At this point, open up a web browser, and navigate to http://localhost:8080 to access the Jenkins admin console.

The Jenkins admin console

At this point in our install Jenkins tutorial, a couple of noteworthy events will happen the first time you access the admin console.

First of all, the CI tool wants to ensure the person with access to the Jenkins admin console is indeed the same person who installed it. To facilitate this authentication process, a hexadecimal key can be found in a file named initialAdminPassword.txt under the Jenkins configuration folders. Simply copy and paste this value into the text field, and click Continue.

Jenkins security is turned on by default ever since the 2.0 release, so unauthenticated access is not initially allowed. Because of the security requirement, what you need to do to access the tool is create an administrative user. Simply create a user named DevOps with the password installjenkins. For the full name, enter DevOps Engineer.

When you've finished the user registration form, click on the option to Save and Finish, and in the following window, click the button that says, "Start using Jenkins!"

start jenkins
Complete the Jenkins install.

After you click "Start using Jenkins!" the admin console will appear. It's worthwhile to poke around the tool and look at the various screens and wizards available, including the ability to see a build history, create a new Jenkins job, manage properties of the tool and create views. It's a good investment of your time to navigate around the different screens and see how the tool is laid out.

admin console
Tour the Jenkins admin console.

More Jenkins tutorials for beginners

And so concludes this install Jenkins tutorial. Let's start building. The next step by step Jenkins tutorial for beginners will move the conversation forward: We will create a Jenkins job and run an actual build. And once you've created Jenkins jobs and run builds, you're well on your way to Jenkins expert status.

Dig Deeper on Java DevOps

Join the conversation


Send me notifications when other members comment.

Please create a username to comment.

When you're installing Jenkins, do you run the stand-alone WAR file, or do you prefer to install the file into a servlet engine, like Tomcat or WebSphere Liberty?
Thanks for the info.
I will prefer to install file into servlate engine.
I didn't know that I could run Jenkins stand-alone. I have tried Docker  and Tom Cat. Now using Tom Cat . 
As per my views installing jenkins  in Tomcat server will be best as it will be much faster than the standalone.