How to install Jenkins in Windows Machine and in AWS EC2 Instance

How to install Jenkins in Windows Machine and in AWS EC2 Instance

1. Windows installation guide

Step 1: Visit the following website to download Jenkins

Step 2: Open the setup file and click next till the following screen comes up

Select Run service as LocalSystem and click on next

Step 3: Port Testing, Select the port of your choice

I am choosing 8081

Step 4: Select the JDK path and click next till Install

Now installation is Done. Open any browser and type

localhost:, e.g. http://localhost:8081/

and you will see the following screen

Step 5: Follow the instruction to unlock the password

Click next after unlocking the password and the following screen will appear. then select Install suggested plugins

It will take some time to install the plugin

Step 6: Create an admin user and Save and continue

Save and Finish

And Jenkins is installed now, Following is the home page of Jenkins

2. Amazon Linux 2 installation guide

Follow this blog to launch EC2 instance

https://medium.com/@U_N_R_3_A_L/deploy-your-first-website-on-the-ec2-instance-d67dcc9bbacc

Step 1: Connect the instance via SSH

Type the below command in terminal

sudo yum update –y

sudo wget -O /etc/yum.repos.d/jenkins.repo \
pkg.jenkins.io/redhat-stable/jenkins.repo

Import a key file from Jenkins-CI to enable installation from the package

sudo rpm --import pkg.jenkins.io/redhat-stable/jenkins.io-202..

sudo yum upgrade

Install java

sudo amazon-linux-extras install java-openjdk11 -y

Install Jenkins

sudo yum install jenkins -y

Enable the Jenkins service to start at boot

sudo systemctl enable jenkins

Start Jenkins as a service

sudo systemctl start jenkins

You will see the following screen after

Now Jenkins is up and running on your Amazon Linux machine

Now, copy the instance's public URL, paste it into the browser, and add port number 8080.
e.g. http://54.242.226.98:8080/

You will see the following screen

Follow the instruction and create the Jenkins user.

First, we installed Jenkins in our local environment and then we installed it in the AWS machine. That’s it about Jenkins installation. Let me know in the comment section if you face any issues.