beawolf - Fotolia
Developers and operations professionals eager to participate in DevOps need to first download and install Jenkins. In this 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 Jenkins tutorial, you must 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 Jenkins tutorial for beginners will use the jenkins.war file.
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.
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.
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!"
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.
More Jenkins tutorials for beginners
And so concludes this install Jenkins tutorial. Let's start building. The next 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.
TheServerSide Jenkins guide
Part 1 -- "Need a CI tool? Here's a Jenkins tutorial for beginners"