How to Install Jenkins on Ubuntu (A Step-by-Step Guide)

Abhishek KataleAbhishek Katale
1 min read

Step 1: The “Jenkins-Master” machine will be opened. Run this command to update the machine:

sudo apt-get update

Step 2: Now, we will install Jenkins on the “Ubuntu” machine. Run this given command:

sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \
  https://pkg.jenkins.io/debian/jenkins.io-2023.key

Step 3: Now, append the Debian package repository to the server’s sources.list.

Run this given command:

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

Step 4: Run this command to install the “java” on “Ubuntu Machine”:

sudo apt install fontconfig openjdk-17-jre

Step 5: First, update the machine & run the below-given commands to update & install the “Jenkins” over the “ubuntu machine.”:

sudo apt-get update
sudo apt-get install jenkins -y

Step 6: Now, enable the Jenkins to start the boot. Run the given command:

sudo systemctl enable jenkins

Step 7: Now, start the “Jenkins” as a service:

sudo systemctl start jenkins

Step 8: Now, check the “Jenkins service” status using this command:

sudo systemctl status jenkins
0
Subscribe to my newsletter

Read articles from Abhishek Katale directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Abhishek Katale
Abhishek Katale