Jenkins is a DevOps Tool written in the Java Programming Language used to enforce CI/CD (Continuous Integration/Continuous Delivery) workflows/pipelines. It assists software developers in automating software building, testing, deployment, and delivery processes. This article will demonstrate the installation, configuration, and setting up of Jenkins on Ubuntu 22.04 LTS.
To install Jenkins on Ubuntu 22.04, the following steps will be performed:
Installation of Java is a prerequisite as Jenkins requires Java to run. Java is not pre-installed on Ubuntu 22.04. Additionally, not all versions of Java are compatible with Jenkins. We will install the OpenJDK
Press Y to continue with the installation.
The above image verifies the successful installation of OpenJDK 17.
The stable version of Jenkins can be downloaded via the curl command from the official website of Jenkins. curl is not pre-installed in Ubuntu and can be installed by
From the above image, it can be seen that the curl is successfully installed.
Next, the following instruction is executed to download Jenkins to the local repository:
/usr/share/keyrings/jenkins-keyring.asc > /dev/null
Next, the Jenkins Repository is added to the local repository by
https://pkg.jenkins.io/debian-stable binary/ | sudo tee
/etc/apt/sources.list.d/jenkins.list > /dev/null
After adding Jenkins to the local repository, system repositories are updated by
To install Jenkins, execute the following command:
Press Y to continue with the installation.
The above image verifies the successful installation of Jenkins.
Execute the following command to enable Jenkins:
Next, start Jenkins with systemctl command.
The status of Jenkins can be checked by:
The above image shows that Jenkins is active.
After activation of Jenkins, the next step is to enable the firewall by executing the following command:
Additionally, to add Jenkins as an exception, allow port 8080 on the firewall.
The above image shows that port 8080 is enabled.
The status of the firewall can be checked by
The above image shows that traffic on port 8080 is allowed.
The following steps are performed to set up Jenkins on Ubuntu 22.04.
From the above image, we can see that the local IP is 127.0.0.1. Next, this IP is used in the above format and Jenkins can either be accessed by http://localhost:8080 or http://127.0.0.1:8080.
It can be observed from the image above, that Jenkins is locked. Jenkins can be unlocked by accessing the administrator password.
In order to use Jenkins effectively, Jenkins can be customized by following steps:
Jenkins can be uninstalled from Ubuntu 22.04 via the apt repository by either of the following commands.
$ sudo apt autoremove jenkins #removes unused dependencies
$ sudo apt purge jenkins #removes the package and its associated system-wide configuration files.
For example, a user can utilize the following command to remove Jenkins
Press Y to continue with the uninstallation process. The uninstallation process will be completed in a few seconds.
To install Jenkins, first install Java, then download Jenkins from the developer page of Jenkins. Next, add the Jenkin repository and update the system repositories. After that execute the “sudo apt install jenkins” command to install Jenkins on Ubuntu 22.04. Then, configure the firewall by allowing port 8080 to add Jenkins as an exception. Finally, the user can access Jenkins by browsing to “http://:8080”. This article demonstrated the installation, configuration, and setting up of Jenkins on Ubuntu 22.04 LTS.
At Canonical, the work of our teams is strongly embedded in the open source principles…
Welcome to the Ubuntu Weekly Newsletter, Issue 873 for the week of December 29, 2024…
Have WiFi troubles on your Ubuntu 24.04 system? Don’t worry, you’re not alone. WiFi problems…
The following is a post from Mark Shuttleworth on the Ubuntu Discourse instance. For more…
I don’t like my prompt, i want to change it. it has my username and…
Introduction: A Fragile Trust The Ruby ecosystem relies heavily on RubyGems.org as the central platform…