How to install Jenkiins on Amazon EC2.

Asishkumar Gouda
1 min readNov 1, 2024

--

Here are the exact steps to install Jenkins on AWS EC2:

1 → Launch EC2 Instance:

  • Log into AWS console and search for EC2 service
  • Click “Launch Instance”
  • Name your instance (e.g., “Jenkins-demo”)
  • Select Ubuntu 22.04 LTS
  • Choose t2.micro (free tier eligible)
  • Select or create a key pair
  • Allow HTTPS and HTTP traffic in network settings

2 → Connect to EC2:

  • Click “Connect” on the EC2 instance
  • Use AWS console terminal to connect

Install Java:

  • Update Ubuntu: sudo apt update
  • Install OpenJDK: sudo apt install openjdk-8-jdk (or version 11)

3 → Install Jenkins:

  • Visit pkg.jenkins.io
  • Add Jenkins repository key and repository
  • Execute installation commands from the Jenkins website

Start Jenkins Service:

  • Start Jenkins: sudo systemctl start jenkins
  • Enable Jenkins: sudo systemctl enable jenkins
  • Check status: sudo systemctl status jenkins

4 → Configure Security Group:

  • Go to EC2 security groups
  • Edit inbound rules
  • Add new rule: Custom TCP, Port 8080
  • Save rules

5 → Complete Jenkins Setup:

  • Access Jenkins using EC2 public IP: http://<public-ip>:8080
  • Get initial admin password: sudo cat /var/lib/jenkins/secrets/initialAdminPassword
  • Install suggested plugins
  • Create admin user with username and password
  • Complete setup and access Jenkins dashboard

--

--

Asishkumar Gouda
Asishkumar Gouda

Written by Asishkumar Gouda

Aspiring Technical Product Manager, Tech Writer, Story Teller.

No responses yet