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 Convert PHP Array To JSON Object
How To Convert PHP Array To JS...

In this article, we will explore the process of converting a PHP array into a JSON object. We'll achieve this transf...

Read More

Jul-08-2020

How To Convert HTML To PDF using JavaScript
How To Convert HTML To PDF usi...

In this example we will see how to convert html to pdf using javaScript. PDF file format is very useful to dow...

Read More

Aug-23-2021

Laravel 10 Livewire Multi Step Form Wizard
Laravel 10 Livewire Multi Step...

Hello developers! Today, I'm excited to walk you through the process of creating a multi-step form wizard using...

Read More

Dec-18-2023

Laravel 8 Left Join Query Example
Laravel 8 Left Join Query Exam...

In this tutorial I will give you laravel 8 left join query example. laravel left join eloquent returns all rows from the...

Read More

Nov-26-2021