Open In App

How to Configure Jenkins in EC2 – AWS in Latest AWS Wizards?

Last Updated : 28 Mar, 2023
Like Article

Pre-requisites: AWS

Jenkins configuration in EC2 instance on amazon web service platform all steps in details which is help to the user to easily set up your Jenkins tools on EC2 instance for the continuous integration and continuous development. Nowadays Jenkins become a more popular tool as compared to others and it is open source. It is free of cost and it is lightweight. Jenkins using the 8080 port. Jenkins code is available for everyone to contribute and add more features to this tool. It has a strong community and it has a number of plugins to do any type of work related to continuous integration and continuous development.

Steps to Configure the Jenkins in EC2 – AWS: 

Step 1: Open the AWS console. Click on the EC2 Service.

Select  EC2


Step 2: Click on the Launch Instance button

Launch instance


Step 3: Type the Instance name – Ubuntu. Select the AMI – Ubuntu

Select OS and AMI


Step 4: Select the Instance type – t2.micro.Create or choose the existing Key pair – linux1

Select instance type and Keypair


Step 5: Create the security group or choose the existing security group. Open the Port.

  • 8080 – Jenkins
  • 80 – HTTP
  • 43 – HTTP
Select the SG


Step 6: Click on the Launch Instance Button

Launch instance


Step 7: Type the command for Root access

 sudo su
Change to root user


Step 8: Update the Instance

apt-get update -y
Update instance


Step 9: Install the JDK

apt install openjdk-11-jre
Install java


Step 10: Check the version

 java -version
Check java version


Step 11: Download plugins

curl -fsSL | sudo tee \ /usr/share/keyrings/jenkins-keyring.asc > /dev/null
Download plugins


Step 12: Install the plugins 

echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ binary/ | sudo tee \  /etc/apt/sources.list.d/jenkins.list > /dev/null
Install plugin


Step 13: Update the Instance again

apt-get update -y
Update instance


Step 14: Install the Jenkins Tool

sudo apt install jenkins -y
Install Jenkins


Step 15: Check the Jenkins status

sudo systemctl status Jenkins
Check Jenkins status


Step 16: Open the Browser and type the “HTTP//<instance-ip>:8080”.Copy the text from your screen “/var/lib/jenkins/secrets/initialAdminPassword”.

Accesses Jenkins from browser


Step 17: Paste into the cmd shell after that you will get the code

Get the password


 Step 18: Then open the browser again and paste it into the Jenkins “Administrator password”

Pate the Jenkins password


Step 19: Click on the Install suggested plugins

Install suggested plugins


Step 20: Now Jenkins is ready you can use it as per your use. Click on the New item to create the job

Create first job


Jenkins is ready you can use it and download your required own plugins. Jenkins acts like a framework because it has more plugins and user can also create their plugins. Do not forget to open port 8080 because Jenkins using port 8080 without opening the port Jenkins can not run.

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads