How to Install Jenkins in windows OS

How to Install Jenkins in Windows OS

Here's a simple step-by-step guide to install Jenkins on Windows:


Step 1: Install Java (JDK)

Jenkins requires Java to run.

  1. Download Java JDK:

  2. Install Java:

    • Run the installer and follow the instructions.
  3. Set JAVA_HOME (important):

    • Right-click This PC → Properties → Advanced system settings → Environment Variables.
    • Under System variables, click New:
      • Variable name: JAVA_HOME
      • Variable value: Path to your Java installation (e.g., C:\Program Files\Java\jdk-11.0.22)
    • Also, add %JAVA_HOME%\bin to your Path variable.
  4. Verify Java Installation:

    • Open Command Prompt and type:
      java -version
      
    • It should show the installed Java version.

Step 2: Download Jenkins

  1. Go to Jenkins official website:
    https://www.jenkins.io/download/
  2. Click "Windows" under the "Long-Term Support (LTS)" version.
  3. Download the .msi installer (recommended for Windows).

Step 3: Install Jenkins

  1. Run the Jenkins installer (.msi file you downloaded).
  2. Installation Wizard will open. Click Next.
  3. Choose installation path (default is fine) and click Next.
  4. Select the Jenkins service logon:
    • Choose Run service as LocalSystem (recommended for beginners).
  5. Click Install and wait for it to complete.
  6. Click Finish once the setup is done.

Step 4: Unlock Jenkins

  1. After installation, Jenkins will open in your browser automatically (if not, go to http://localhost:8080).
  2. It will ask for an Administrator password.
  3. Find the password:
    • Go to the file:
      C:\Program Files\Jenkins\secrets\initialAdminPassword
      
    • Open it with Notepad and copy the password.
  4. Paste the password into Jenkins and click Continue.

Step 5: Install Plugins

  1. Click "Install suggested plugins" (recommended for beginners).
  2. Jenkins will download and install common plugins.

Step 6: Create First Admin User

  1. After plugin installation, it will ask you to create an admin user.
  2. Fill in the username, password, full name, and email address.
  3. Click Save and Continue.

Step 7: Start Using Jenkins

  • Jenkins dashboard will open!
  • You can now start creating Jobs, Pipelines, and Projects.


Comments