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 KasimbaI don’t like my prompt, i want to change it. it has my username and host, but the formatting is not what i want. This blog will get you started quickly on doing exactly that.
This is my current prompt below:
To change the prompt you will update .bashrc and set the PS1 environment variable to a new value.
Here is a cheatsheet of the prompt options:
You can use these placeholders for customization:
\u – Username
...-
Channel: Articles
01-06-2025, 01:15 AM -
-
by KasimbaIn this post I will show you how to install the ZSH shell on Rocky Linux. ZSH is an alternate shell that some people prefer instead of BASH shell. Some people say ZSH has better auto-completion, theme support, and plugin system. If you want to give ZSH a try its quite easy to install and give it a try. This post is focused on the Rocky Linux user and how to install ZSH and get started with its usage.
Before installing anything new, it’s good practice to update your system packages:...-
Channel: Articles
12-25-2024, 02:01 AM -
-
by Kasimba
by George Whittaker
Introduction
In the world of operating systems, Windows has long held the lion’s share of the market. Its user-friendly interface and wide compatibility have made it the default choice for many. However, in recent years, Linux has steadily gained traction, challenging the status quo with its unique offerings. What was once considered the domain of tech enthusiasts and developers is now...-
Channel: Articles
12-21-2024, 06:52 AM -
-
by KasimbaOverview of NGINX and Apache
NGINX and Apache are leading web server solutions utilized for hosting websites and web applications. Apache, developed by the Apache Software Foundation, offers robust configuration options and extensibility. NGINX, created by Igor Sysoev, is known for its efficiency in handling numerous concurrent connections with low resource utilization. Both servers function not only as HTTP servers but also as reverse proxies, load balancers, and more.
What is
...-
Channel: Articles
12-21-2024, 03:54 AM -
-
by KasimbaHi everyone, I hope you are enjoying the BETA so far! This release introduces new features, tools, and artwork, so we anticipate a good number of bug reports. Every single fix helps us refine and improve the final release. Your feedback during the BETA phase is extremely important to us. Linux Mint 22.1 is our […]
More...-
Channel: Articles
12-16-2024, 11:50 AM -
-
by Kasimba
by George Whittaker
Introduction
Remote access is a cornerstone of modern IT infrastructure, enabling administrators and users to manage systems, applications, and data from virtually anywhere. However, with great power comes great responsibility—ensuring that remote access remains secure is paramount. This is where OpenSSH steps in, providing robust, encrypted communication for secure remote management....-
Channel: Articles
12-13-2024, 10:31 PM -