How to Install Jenkins on Ubuntu

Websolutionstuff | Aug-07-2023 | Categories : Other

In today's fast-paced software development landscape, I've understood the significance of continuous integration and continuous delivery (CI/CD) in ensuring the swift and reliable delivery of high-quality software.

Among the plethora of tools available, Jenkins stood out as one of the most popular and versatile automation servers, promising to easily automate our build, test, and deployment processes.

As an Ubuntu user looking to harness the power of Jenkins for my projects, I embarked on a journey to install it on my Ubuntu machine. This comprehensive guide documents my step-by-step experience, enabling me to set up a robust CI/CD pipeline quickly.

Whether you're a seasoned DevOps engineer or a curious developer like me, seeking to optimize your development workflow, this article equips you with all the necessary knowledge and instructions to get Jenkins up and running smoothly.

So, let's dive into my world of Jenkins installation on Ubuntu and unlock the potential for faster, more efficient software delivery. Also, you can install Jenkins on Ubuntu 20.04, install Jenkins on Ubuntu 22.04, how to setup Jenkins in Ubuntu, and install Jenkins on Ubuntu using the terminal.

 

Step 1: Update System Packages

Before starting the Jenkins installation process, it's essential to ensure that your Ubuntu system's package repositories are up to date. Open a terminal and run the following commands.

sudo apt update
sudo apt upgrade

 

Step 2: Install Java Development Kit (JDK)

Jenkins requires Java to run. Install the Java Development Kit (JDK) on your Ubuntu machine by executing the following command.

sudo apt install default-jdk

 

Step 3: Add Jenkins Repository Key

Next, add the Jenkins repository key to your system to verify the authenticity of the Jenkins package during installation. Run the following command.

wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -

 

Step 4: Add Jenkins Repository

Now, add the Jenkins repository to the package manager's sources list.

sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'

 

 

Step 5: Install Jenkins

Update the package list once again, then install Jenkins.

sudo apt update
sudo apt install jenkins

 

Step 6: Start Jenkins Service

After the installation is complete, start the Jenkins service.

sudo systemctl start jenkins

 

Step 7: Enable Jenkins on System Startup

To ensure Jenkins starts automatically upon system boot, enable the service.

sudo systemctl enable jenkins

 

Step 8: Verify Jenkins Status

Check if Jenkins is running by using the following command.

sudo systemctl status jenkins

 

Step 9: Access Jenkins Web Interface

Jenkins has a web-based interface accessible through your browser. Open your preferred web browser and enter the following URL.

http://your_server_ip_or_domain:8080

 

Step 10: Unlock Jenkins

On your first visit to the Jenkins web interface, you will be prompted to unlock Jenkins. To retrieve the initial admin password, run the following command.

unlock-jenkins

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

Copy the provided password and paste it into the Jenkins web interface to unlock.

 

Step 11: Install Recommended Plugins

Next, you'll be given the option to install recommended plugins or select specific plugins. Choose the "Install suggested plugins" option to get started quickly.

 

Step 12: Create Jenkins Admin User

After plugin installation, you'll be prompted to create an admin user. Fill in the required details to set up your Jenkins admin account.

jenkins_create_user

 

Step 13: Start Using Jenkins

Congratulations! Jenkins is now installed and ready to use. You can start creating your CI/CD pipelines, jobs, and automating your development processes.

That's it! You've successfully installed Jenkins on your Ubuntu system. Enjoy the benefits of automated software delivery with Jenkins' powerful capabilities.

 


You might also like:

Recommended Post
Featured Post
How To Change Month Name In jQuery Datepicker
How To Change Month Name In jQ...

In this article, we will see how to change the month name in jquery datepicker. In the date picker, we can change t...

Read More

Jul-01-2022

Comparing VPS Hosting Providers with Global Data Centers
Comparing VPS Hosting Provider...

It can be hard to find the best VPS hosting UAE provider with global data centers in today’s market. The majority...

Read More

Jun-26-2024

How To Send Email With Attachment In Laravel 8
How To Send Email With Attachm...

In this tutorial i will show you how to send email with attachment in laravel 8. As we all know mail functionalities are...

Read More

May-05-2021

Laravel Rollback Targeted Migration Reversals
Laravel Rollback Targeted Migr...

As a Laravel developer, I understand the significance of migrations in managing database changes and maintaining a consi...

Read More

May-29-2023