How to Set Up Jenkins Dashboard on an AWS EC2 Instance

If you're new to DevOps or cloud automation, here's a quick guide to get Jenkins running on an EC2 server:
🖥️ Launch Your EC2 Instance
Navigate to AWS EC2 and select "Launch Instance."
Choose the instance type: c7i.flex.large (2 vCPU, 4GB RAM).
In the Network Settings, create a new security group:
Add port 8080 (Jenkins default).
Set the source type to "Anywhere."
Click "Launch."
🔐 Connect & Prep the Server
SSH into your EC2 instance and switch to the root user.
Proceed to install Java, as Jenkins operates on Java:
yum install java-17-amazon-corretto -y
java -version
📦 Add Jenkins Repository From jenkins.io, copy the RedHat Linux setup commands:
sudo wget -O /etc/yum.repos.d/jenkins.repo https://lnkd.in/d8FPbwgX
sudo rpm --import https://lnkd.in/dzte75Hv
⚙️ Install & Start Jenkins
Install Jenkins using the following command: yum install jenkins -y
To start Jenkins, execute:systemctl start jenkins
Verify the status of Jenkins with:systemctl status jenkins
🌐 Access Jenkins Dashboard
In your browser: http://<your-ec2-public-ip>:8080
Unlock Jenkins using the path displayed on the dashboard
Install the suggested plugins
Create your admin user → Save & Continue
✅ Jenkins is now ready to use!
🔒 Note: Jenkins will stay active only while your EC2 instance is running. If terminated, you’ll need to repeat the setup.