Friday, September 20, 2024
Google search engine
HomeGuest BlogsInstall Jenkins on Windows: A Step-By-Step Guide

Install Jenkins on Windows: A Step-By-Step Guide

Introduction

Jenkins is an open-source automation server developers can use to automate building, testing, and deploying applications. It is available on a variety of systems, including Windows, Linux, Unix, and macOS.

In this tutorial, we take you through the step-by-step process of installing, unblocking, and customizing Jenkins on Windows 10.

Install Jenkins on WindowsInstall Jenkins on Windows

Prerequisites

  • A system running Windows 10
  • The latest copy of Java Development Kit or Java Runtime Environment installed
  • Access to an account with administrator privileges

Note: Check out our in-depth Jenkins tutorial perfect for users who are just starting.

Install Jenkins on Windows

1. Browse to the official Jenkins download page. Under the Downloading Jenkins section is a list of installers for the long-term support (LTS) version of Jenkins. Click the Windows link to begin the download.

Downloading the Windows installation file from the Jenkins websiteDownloading the Windows installation file from the Jenkins website

2. Once the download is complete, run the jenkins.msi installation file.

3. The setup wizard starts. Click Next to proceed.

Starting the Jenkins install wizardStarting the Jenkins install wizard

4. Select the install destination folder and click Next to continue.

Selecting the install destinationSelecting the install destination

5. Under the Run service as a local or domain user option, enter the domain username and password for the user account you want to run Jenkins with. Click Test Credentials to verify the login data, then click Next to proceed.

Adding user credentials for the Jenkins administratorAdding user credentials for the Jenkins administrator

Using the Run service as LocalSystem option doesn’t require you to enter user login data. Instead, it grants Jenkins full access to your system and services. Note that this is a less secure option and is thus not recommended.

Note: When selecting the Run service as local or domain user, the user in question must have the required permission to log on as a service. If this is not the case, an error message stating the account cannot be verified appears. In the event of this error, perform the following steps to resolve the issue:

1. Make sure you are logged in as a user with administrative privileges.
2. In the Administrative Tools, open Local Security Policy.
3. In the Local Security Policy window, expand Local Policy in the left-hand panel and select User Rights Assignment.
4. In the right-hand side panel, right-click Log on as service and select Properties.
5. Click the Add User or Group… button.
6. Use the Select Users or Groups dialogue to add the current user and click OK.
7. Save changes by clicking the OK button in the Properties window.

6. Enter the port number you want Jenkins to run on. Click Test Port to check if the selected port is available, then click Next to continue.

Entering the port number Jenkins will useEntering the port number Jenkins will use

7. Select the directory where Java is installed on your system and click Next to proceed.

Selecting the Java install directorySelecting the Java install directory

8. Select the features you want to install with Jenkins and click Next to continue.

Choosing which Jenkins services to installChoosing which Jenkins services to install

9. Click Install to start the installation process.

Starting the installation processStarting the installation process

10. Once the installation is complete, click Finish to exit the install wizard.

Closing the install wizardClosing the install wizard

Unblock Jenkins

After completing the installation process, you have to unblock Jenkins before you can customize and start using it.

1. In your web browser, navigate to the port number you selected during the installation using the following address:

http://localhost:[port number]

2. Navigate to the location on your system specified by the Unblock Jenkins page.

The Unblock Jenkins page shows the path to the file with the administrator passwordThe Unblock Jenkins page shows the path to the file with the administrator password

Note: The Unblock Jenkins page may point to a hidden directory. In case you cannot find the directory, make sure you enable viewing hidden items.

3. Open the initialAdminPassword file using a text editor such as Notepad.

4. Copy the password from the initialAdminPassword file.

Copying the administrator passwordCopying the administrator password

5. Paste the password in the Administrator password field on the Unblock Jenkins page and click Continue to proceed.

Entering the administrator password on the Unblock Jenkins pageEntering the administrator password on the Unblock Jenkins page

Customize Jenkins

Once you unlock Jenkins, customize and prepare the Jenkins environment.

1. Click the Install suggested plugins button to have Jenkins automatically install the most frequently used plugins.

Selecting the Install suggested plugins optionSelecting the Install suggested plugins option

Note: If you are an advanced user, clicking the Select plugins to install button allows you to choose which plugins to install.

2. After Jenkins finishes installing the plugins, enter the required information on the Create First Admin User page. Click Save and Continue to proceed.

Adding a new administrator userAdding a new administrator user

3. On the Instance Configuration page, confirm the port number you want Jenkins to use and click Save and Finish to finish the initial customization.

Verifying the port number for JenkinsVerifying the port number for Jenkins

4. Click the Start using Jenkins button to move to the Jenkins dashboard.

Opening the Jenkins dashboardOpening the Jenkins dashboard

5. Using the Jenkins dashboard, click Create a job to build your first Jenkins software project.

Creating the first job to start using JenkinsCreating the first job to start using Jenkins

Note: Learn how to restart Jenkins manually while troubleshooting issues or installing plugins.

Conclusion

After reading this tutorial, you should have a functional Jenkins environment installed on your Windows system.

If you are interested in using Jenkins on a Linux system, have a look at our guides on installing Jenkins on Debian, installing Jenkins on CentOS, or installing Jenkins on Ubuntu.

Was this article helpful?
YesNo

RELATED ARTICLES

Most Popular

Recent Comments