Arbythecoder
Posted on April 28, 2024
For a first-timer, trying to install and use Jenkins can feel overwhelming. Juggling prerequisites, configuration steps, and scattered online resources can be frustrating. This guide aims to change that. We'll walk you through installing and configuring Jenkins on Windows 10/11 or Windows Server, step-by-step, ensuring a smooth and successful setup.
Introduction
Installing Jenkins on Windows is a crucial step for many developers and system administrators. This guide provides a detailed, step-by-step approach to setting up Jenkins, focusing on the prerequisites, installation process, and post-installation configuration.
Prerequisites
- Java Development Kit (JDK) 17 or Higher: Ensure that Java Development Kit (JDK) version 17 or higher is installed on the Windows system. Jenkins requires Java to run.
Downloading and Installing Java JDK
- Download the x64 version of Java JDK from the official website: https://www.java.com/download/ie_manual.jsp
- Run the downloaded installer and follow the on-screen instructions to complete the Java installation.
Setting up Environment Variables for Java in Windows
- Navigate to your system environment variables. You can search for "Edit the system environment variables" in the Start menu.
- Click on "Environment Variables."
- Under "System variables," find the variable named "Path" and click "Edit."
- Add the path to your Java installation directory (e.g.,
C:\Program Files\Java\jdk-17.0.5\bin
) to the end of the variable value, separated by a semicolon (;). - Click "OK" to save the changes.
Installing and Configuring Jenkins
1. Checking Installed Java Version
Before proceeding, verify the installed Java version:
- Open Command Prompt (Win + R, type
cmd
, and press Enter). - Type
java -version
and press Enter. - The output should display "java version 17.0.5" (or a higher version) to confirm compatibility.
2. Downloading Jenkins LTS and Reviewing Requirements
- Download the latest Long-Term Support (LTS) version of Jenkins from the official website: https://www.jenkins.io/download/
- Review the hardware and software requirements listed on the download page to ensure compatibility with your system.
3. Installation Process on Windows 10/11 or Server
- Run the downloaded Jenkins Windows installer (.msi file).
- Follow the on-screen instructions during the installation process:
- Choose the installation type (Windows service recommended).
- Select the services you want to install with Jenkins (default options are usually sufficient).
- Specify the port number for Jenkins (default is 8080).
- Choose the Java directory (should point to your previously installed JDK).
- Select any desired firewall exceptions.
- Choose the installation location on your local hard drive.
- Click "Install" to begin the installation process.
4. Completing Jenkins Setup
- Upon successful installation, you'll be provided with the initial admin password. Copy this password for later use.
- In your web browser, navigate to
http://localhost:8080
(or the port you used during installation) to access the Jenkins dashboard. - Paste the copied admin password in the login field and click "Sign in."
- Select the plugins you want to install for your project (e.g., Git plugin for version control). The installation process might take a few minutes.
- Create an admin user with a username, password, and email address.
Conclusion
By following these steps, you've successfully installed and configured Jenkins on your Windows system.
You can now access the Jenkins dashboard and start creating jobs to automate your software development workflows.
Remember to consult the official Jenkins documentation for more advanced configuration and usage details: https://www.jenkins.io/doc/book/
Additional Tips:
- Download the 64-bit (x64) version of Java JDK for compatibility with most systems.
- Consider firewall exceptions if necessary to ensure Jenkins can communicate properly.
- Explore the vast array of plugins available for Jenkins to extend its functionality for your specific needs.
Posted on April 28, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.