DEV Community

Sashi Kapoor
Sashi Kapoor

Posted on

how to install jenkins on ubuntu

Step-1 Install Java

Update your system

Install java

sudo apt install openjdk-21-jre

java -version

It should look something like this after running the command

openjdk version "21.0.1" 2023-10-17

Step-2 Install Jenkins

The commands you provided are used to add the Jenkins repository and its GPG key to your system, specifically for Debian-based Linux distributions.

Add Jenkins GPG Key:
Enter fullscreen mode Exit fullscreen mode

wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -

**

  1. Add Jenkins Repository to APT Sources:**

echo "deb http://pkg.jenkins.io/debian-stable binary/" | sudo tee -a /etc/apt/sources.list.d/jenkins.li

sudo apt-get update
sudo apt-get install jenkins

sudo systemctl enable jenkins
sudo systemctl start jenkins

sudo systemctl status jenkins

Open your web browser and enter the following URL in the address bar:

http://localhost:8080

Setup Jenkins

Set an Admin Password to use Jenkins: Copy the command below and paste it on a terminal and you will get your Admin Password.
Enter fullscreen mode Exit fullscreen mode

/var/lib/jenkins/secrets/intialAdminPassword

** Install suggested plugins**

Image description

** Create a Username and Password**

Image description

Keep it running on the default URL

Image description

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

Billboard image

Use Playwright to test. Use Playwright to monitor.

Join Vercel, CrowdStrike, and thousands of other teams that run end-to-end monitors on Checkly's programmable monitoring platform.

Get started now!