How to Install and Configure Jenkins on Ubuntu
Jenkins is the most sought-after tool used for automating software development. The automation software allows you to easily integrate various DevOps stages in your project.
Jenkins has great community support. The best thing about the tool is that it is easy to install and learn on any Linux system. Let’s see how you can install and configure Jenkins on Ubuntu 22.04.

What Is Jenkins?
The leading automation server in the market, Jenkins is a free and open-source system that helps in the building, testing, and deploying stages of software development to achieve fast deployment of applications in a production environment.
With this tool, you may set up a continuous integration and continuous delivery (CI/CD) environment for any combination of languages and source code repositories with the help of pipelines.

Jenkins also has support for Slack. A large team of developers and DevOps engineers require a platform to collaborate in a work environment. For this purpose, it’s possible to integrate Jenkins with Slack.
It also offers various plugins that help in building, deploying, and automating any project. According to the Jenkins community, there are around 1,500 plugins available for various applications.

Prerequisites to Install Jenkins on Ubuntu
Before getting started with Jenkins installation, you need to make sure that your system meets the following requirements:
If your system fulfills these requirements, you are good to go.

How to Install Jenkins on Ubuntu
Here are the steps to install Jenkins on Ubuntu:
Step 1: Install Java Development Kit 11
Jenkins is written in the Java programming language. For it to function, you either need the latest version of Java Development Kit (JDK) or Java Runtime Environment (JRE).
To install Java Development Kit, it’s recommended to firstupdate and upgrade your Ubuntu systemusing the following commands:

Jenkins supports both Java Runtime Environment 8 and 11. You caninstall Java 11 on your systemusing this command:
Now, verify if the correct version of Java has been successfully installed with:
You will see an output stating that OpenJDK version 11 has been installed.
Step 2: Install Jenkins on Ubuntu
Install Jenkins by issuing the following command:
Then type:
For the new changes to take effect, run:
Once the changes have been updated, execute the following command to install Jenkins:
When prompted for confirmation, enterYand hitEnterto begin the installation process.
Step 3: Start Jenkins on Ubuntu
Once you’ve installed Jenkins, start the service on Ubuntu with this command:
You can verify the Jenkins service status with:
If it is running fine, you will see the following output on the terminal:
Step 4: Set UFW Firewall Rules for Jenkins
Jenkins, by default, uses port 8080. To make sure this port is accessible, you need toadjust firewall rules with UFW.
To allow port 8080 to listen to upcoming connections, issue the following command:
If the rules are successfully updated, you will see a confirmation message on the command line stating the same.
Next, enable UFW with this command:
Check the status of UFW by typing:
In the output, you will see that port 8080 has been allowed and is actively listening for new connections.
Step 5: Access the Jenkins Dashboard on a Web Browser
To launch and configure Jenkins, open a browser, and enter the IP address of your server in the following format:
If you are running Jenkins locally, you can access it using:
To unlock Jenkins, you need to authenticate yourself by providing the password kept in the/var/lib/jenkins/secrets/initialAdminPasswordfile.
The file permissions don’t allow a normal user to access it as it is a password file. Open the command line and run the following command to become a root user.
Now run the following command to get the password from the file:
You will find an alphanumeric code like this:
Copy the code and paste it into the box underAdministrator passwordand clickContinue.
Essential Configurations for Jenkins
After accessing the Jenkins web interface, you need to make some necessary configurations.
1. Install Plugins for Jenkins
Jenkins makes use of plugins for continuous integration. To integrate a particular tool, you need to install the plugins for the particular tool, like HTML Publisher and Amazon EC2.
To install plugins, click onInstall suggested plugins.
This is the interface you’ll use to install the plugins.
2. Create an Administrator Account for Jenkins
Once you’ve installed all the necessary plugins, Jenkins will prompt you to create an admin user account. Provide the username, password, and e-mail address to create the admin account.
Now clickSave and Continue. Once the account is created, you will be ready to use Jenkins. Click onStart using Jenkinsto continue:
After the initial configuration, you will be able to access the Jenkins Dashboard.
How to Uninstall Jenkins From Ubuntu
When you want to remove Jenkins from Ubuntu, run the following APT command:
Deploy Applications Much Faster With Jenkins on Ubuntu
After the initial configuration of Jenkins, you can begin continuous integration and continuous deployment and monitor pipelines on the Jenkins dashboard. With Jenkins, you can now automate tasks, deploy code, increase code coverage, improve code efficiency, make audits simple, and so much more.
Thanks to Jenkins’ intuitive interface and simple framework, DevOps engineers can now deploy applications more efficiently in production environments.
If you’re interested in becoming a DevOps engineer, there are several things you should do to prepare yourself. Here’s a step-by-step guide to help.
Your phone’s camera app doesn’t show this, so it’s easy to miss.
Make sure you don’t miss these movies and shows before Netflix removes them.
Unlock a world of entertainment possibilities with this clever TV hack.
Now, I actually finish the books I start.
One casual AI chat exposed how vulnerable I was.