How to setup Jenkins on AWS EC2 Ubuntu

Aqeel Sadiq
May 9, 2024

setup jenkins is same for both EC2 and your local machine.below are the steps to install Jenkins.

Step-1 Install java:

Update your system

Sudo apt update

Install java

sudo apt install openjdk-11-jre

Check java version

java --version

Step-2 Install Jenkins:

1- curl -fsSL https://pkg.jenkins.io/debian/jenkins.io.key | sudo tee \   /usr/share/keyrings/jenkins-keyring.asc > /dev/null 


2- echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ https://pkg.jenkins.io/debian binary/ | sudo tee \ /etc/apt/sources.list.d/jenkins.list > /dev/null

3- sudo apt-get update

4- sudo apt-get install jenkins

Step -3 Start Jenkins:

1- sudo systemctl enable jenkins

2- sudo systemctl start jenkins

3- sudo systemctl status jenkins

enable the port 8080 in your EC2 security group inbound rule and copy the public ip of EC2 and paste it on browser e.g 12.24.22.65:8080

hope this blog finds you well.

--

--