DEV Community

TheBadCoder
TheBadCoder

Posted on

How to install and use Jenkins on Windows for beginners

Pr-requisite: Java

We are not going to cover java installation in this blog however there is nothing to get disappointed, you can find tutorials about java installation all over the internet and I will help you with one that I used.
[Java download and installation on windows](https://phoenixnap.com/kb/install-java-windows)

Get Jenkins

Hold tight guys we are going to take off from here and I promise at the end of the article you guys would have Jenkins installed on your windows machine.
So first things first, download stable version from official website Jenkins Download Page

  1. Check downloading Jenkins section, there are 2 options
    • Download Jenkins 2.xxx.x LTS
    • Download Jenkins 2.xxx.x Here we will be using the one that says LTS(Long time support)
  2. But as you can see that there are different options for the operating systems for which we can download the LTS version. As we are focusing on windows here let's click windows to download the Jenkins to our local machine.
  3. Double click on the set up that we have downloaded(jenkins.msi). The installation wizard will start and will ask if we want to continue, click next. Installation- Welcome wizard
  4. Choose destination directory/folder to install the Jenkins on the local machine. Installation location selection
  5. Now we need to choose log on type. Log on type for Jenkins - Not to choose Here I we will choose the not recommended option because we want to to get started with Jenkins. The thing here with other option is that you need to have administrator rights to work with default selected option. So lets select the option Run service as LocalSystem (not recommended) Log on type for Jenkins - Use this one Once you select the option, you see the wizard won't ask you for account and credentials as mandatory part. Click next.
  6. Port selection Here you can choose on which port the Jenkins should run so that you can access it as a localhost port. If you don't choose yours by default Jenkins will run on 8080. As for me, I would go ahead with port number 7777. Jenkins port selection for installation Test the port and if it is available click "next".
  7. Select java directory- Here the java installation from our per-requisites plays it's part. Please provide the jdk/jre path here. Click "next". Java version to be used by Jenkins
  8. Here on just go on clicking next and next and finish like a straight forward steps in any other setup. Installation task itself will take few minutes to complete so have a cup of coffee by the time the Jenkins is ready for you!

SETUP Jenkins

After the installation is done there are few more steps to set up the Jenkins and start using it.

  1. Open the web browser and launch the url with the port that we used in step 6. ex. http://127.0.0.1:7777
  2. Unlock Jenkins -Jenkins will ask for Admin password, and the same prompt will show the location (Example location: C:\Users\MyAdmin.jenkins\secrets\initialAdminPassword.) where the password can be found, copy the password from the file and paste it in the Admin password box and click continue button.
  3. Customize Jenkins- Its all about different plugins that we may need to use for the supporting tasks to our build job, say git, gradle, ant. Here I would suggest to install the recommended plugins, so go ahead with the option where it says "Install Suggested Plugins". Customize Plugins The plugin installation may take few minutes, the progress bar on the screen will keep you informed about what is going on.
  4. Create First Admin User- Set username, password, full name, email address for the user that you are going to use to access Jenkins. I would suggest to keep it simple and something that you can remember as it is just a local installation that you will be using for hands-on.
    Create Admin User For Jenkins

  5. Finish set up- Jenkins will present us the Jenkins url that we need to use, click on Save and Finish button. Jenkins says its ready now, you just need to launch the localhost with Jenkins port and provide username with valid password and the Jenkins will be ready to serve you.

Hope this helps, edits and suggestions are always welcome! Do share your feedback if you find it useful.

Top comments (0)