Installing Jenkins on Ubuntu 22.04 LTS – Updated

Introduction

Jenkins is an automation server that is free to use. It facilitates continuous integration and delivery by automating the building, testing, and deployment phases of software development. It is a server-based system that runs in Apache Tomcat and other servlet containers.

In this post, We will install Jenkins on ubuntu 22.04 LTS

Step 1: Update the System

We need to 1st update and upgrade the current ubuntu repository to avoid difficulties situations, Use the given command for the same.

sudo apt-get update  
sudo apt-get upgrade -y

After execution of this command, We are good to go next steps.

Step 2: Install Java 11

We need to install dependencies for Jenkins and Jenkins run on JAVA So that’s we need to install 1st JAVA 11 with ubuntu 22.04 LTS, Use the following command for the same.

sudo apt-get install openjdk-11-jdk -y

Step 3: Add Jenkins Repository

We need to add the Jenkins repository to add in ubuntu current repository list, Use the following command for the same.

wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key |sudo gpg --dearmor -o /usr/share/keyrings/jenkins.gpg
sudo sh -c 'echo deb [signed-by=/usr/share/keyrings/jenkins.gpg] http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'

Step 4: Install Jenkins

Now we are refresh the ubuntu repository, We are ready to install Jenkins on ubuntu 22.04 LTS, Use the following command for the same.

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

Step 5: Verify the Jenkins Service Status

Once installation process got completed So then, We need to make sure Jenkins service should be up and running, Use the following command for the same.

sudo systemctl status jenkins.service

We should get out put like this.

Step 6: Create Jenkins Admin User

We need to access the jenkins using browser with machine IP address or localhost address, Jenkins using by defaut port number 8080.

http://localhost :8080 or http://ip_address:8080

You should get out put like this.

You need to use the follwing commad to get initial admin password from your jenkins machine.

sudo cat /var/lib/jenkins/secrets/initialAdminPassword

And then we need to click on Continue button, To get next config setting, and after that you should get Customize Jenkins config web page like this.

We need to chose the plugin selecton as per our need but in this time, I am going to choose the install suggested plugins.

Once install the all the suggested jenkins plugins, We will get the Admin Account creation page, We need to enter the username, password, Full name and email over their.

After clicking on Save and Continue button, We should get Instance Configuration web page like this.

After clicking on Save and Finish button, We should get Jenkins dashboard like this.

Conclusion

We have successfully install Jenkins on ubuntu 22.04 LTS, if you still have questions, please post them in the comments section below.

Author

Installing Jenkins on Ubuntu 22.04 LTS – Updated

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top