X
Collapse
-
How to Install Jenkins on Ubuntu 24.04
Jenkins is an open-source continuous integration tool that automates technical tasks such as software testing, building, and deployment. It is a Java-based tool, and as a DevOP, knowing how to install and use Jenkins will save you time and resources.
Jenkins supports numerous platforms, and this post focuses on installing it on Ubuntu 24.04. We will guide you through a step-by-step process to ensure you don’t get stuck. Let’s begin!
Step-By-Step Installation of Jenkins on Ubuntu 24.04
The Jenkins repository is not included in Ubuntu 24.04. As such, we must fetch it and add it to our system. Again, we’ve mentioned that Jenkins is a Java-based tool. Therefore, you must have Java installed, and in this case, we will work with OpenJDK 11. Once you have the two prerequisites in place, installing Jenkins will be an easy task.
Proceed with the below steps.
Step 1: Install Java
We must have a Java Runtime Environment before we can install and use Jenkins. However, not all Java versions are supported. To be safe, consider installing OpenJDK 8 or 11.
Verify that you have installed the correct Java version.
$ java -version
If not installed, use the following command to install OpenJDK 11.
$ sudo apt install openjdk-11-jdk
Step 2: Fetch and Add the Jenkins Repository
Jenkins is available as a stable or weekly version. This step requires us to download the Jenkins GPG key and then its software repository. After verification, we can then add the repository to our source list.
First, let’s execute the following command to import the Jenkins GPG key.
$ sudo wget -O /usr/share/keyrings/jenkins-keyring.asc https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
The next task is adding the Jenkins repository by executing the following command.
$ echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] https://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list > /dev/null
Step 3: Install Jenkins
After adding the stable Jenkins release to our source list, we can proceed with installing it, but first, let’s update the Ubuntu 24.04 repository to refresh the source list.
$ sudo apt update
Next, install Jenkins and ensure the installation completes without interruptions.
$ sudo apt install jenkins -y
Once installed, check the version to confirm that we managed to install it successfully.
$ jenkins --version
Step 4: Configure the Firewall
We must modify our Firewall to create a rule allowing Jenkins to communicate via port 8080. First, start the Jenkins service.
$ sudo systemctl start jenkins
$ sudo systemctl status jenkins
Next, add a new UFW rule and check that your firewall is active. If the firewall is inactive, enable it.
$ sudo ufw allow 8080
$ sudo ufw status
Step 5: Configure Jenkins
We will access Jenkins via a browser to set it up. On your browser tab, access the below URL. Be sure to add the correct IP or domain name of your server and port number 8080.
http://ip_address:8080
You will get a window displaying the “Getting Started” information. On the page, find the path to the file containing the administrator password.
login
Go back to your terminal and open the file using a text editor or a command such as “cat.”
$ sudo cat /var/lib/jenkins/secrets/initialAdminPassword
The administrator password will be displayed on your terminal. Copy the generated password and paste it into your browser in the “Administrator password” input box.
At the bottom of the window, click on the Continue button.
A new window will open. Click on the selected option to “Install suggested plugins.”
Jenkins will initiate the setup.
Once the process is complete, you will be prompted to create your administrator credentials.
Type the admin username and password, then click the “Save and Continue” button.
On the next window, note the Jenkins URL and click the “Save and Finish” button
That’s it. Jenkins is now installed and configured on your Ubuntu 24.04. Click on the Start using Jenkins button to enjoy using Jenkins.
You will get a window similar to the one below.
Conclusion
Jenkins has numerous applications, especially for developers. If you use Ubuntu Noble Numbat, this post has shared a step-by-step guide on how to install Jenkins. Hopefully, this post will be insightful to you, and you will be able to install Jenkins.
More...Tags: None
Posting comments is disabled.
Categories
Collapse
Article Tags
Collapse
There are no tags yet.
Latest Articles
Collapse
-
by Kasimba
by George Whittaker
Introduction
Qualitative data analysis (QDA) is a cornerstone of research across various fields, from social sciences to marketing. It involves uncovering patterns, themes, and meanings within non-numerical data such as interviews, focus groups, and textual narratives. In this era of digital tools, MAXQDA stands out as a premier software solution for QDA, empowering researchers to organize...-
Channel: Articles
11-21-2024, 11:31 PM -
-
by Kasimba
by german.suarez
Introduction
In today’s fast-paced digital landscape, ensuring the availability and performance of applications is paramount. Modern infrastructures require robust solutions to distribute traffic efficiently and maintain service availability even in the face of server failures. Enter HAProxy, the de facto standard for high-performance load balancing and failover.
This article...-
Channel: Articles
11-21-2024, 03:00 PM -
-
by KasimbaArch Linux hasn't had a license for any package sources (such as PKGBUILD files) in the past, which is potentially problematic. Providing a license will preempt that uncertainty.
In RFC 40 we agreed to change all package sources to be licensed under the very liberal 0BSD license. This change will not limit what you can do with package sources. Check out the RFC for more on the rationale and prior discussion.
Before we make this change, we will provide contributors with...-
Channel: Articles
11-19-2024, 09:21 AM -
-
by Kasimba
by George Whittaker
Introduction
In the world of cybersecurity and software development, binary analysis holds a unique place. It is the art of examining compiled programs to understand their functionality, identify vulnerabilities, or debug issues—without access to the original source code. For Linux, which dominates servers, embedded systems, and even personal computing, the skill of binary analysis is...-
Channel: Articles
11-18-2024, 07:10 PM -
-
by KasimbaDebian and Ubuntu are two popular Linux distributions. In this deep dive we will guide you on the key differences between them from perspective of both corporate enterprise and personal productivity or pleasure usage. After reading this blog post you should be in a better position to decide to select Ubuntu or Debian.
Stewardship, Licensing, Community and Cost
Where as Debian is 100% fully committed to free software as defined by the Debian Free Software Guidelines, Ubuntu is created...-
Channel: Articles
11-17-2024, 08:30 PM -
-
by Kasimba
by George Whittaker
Introduction
In the digital age, data loss is a critical concern, and effective backup and recovery systems are vital for any Debian system administrator or user. Debian, known for its stability and suitability in enterprise, server, and personal computing environments, offers a multitude of tools for creating robust backup and recovery solutions. This guide will explore these solutions,...-
Channel: Articles
11-13-2024, 05:30 PM -