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 Install Jenkins on Ubuntu
How to Install Jenkins on Ubun...

In today's fast-paced software development landscape, I've understood the significance of continuous integration...

Read More

Aug-07-2023

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 8 Remove/Hide Columns While Export Data In Datatables
Laravel 8 Remove/Hide Columns...

In this article, we will see how to remove/hide columns while export data in datatables in laravel 8. When we are u...

Read More

Oct-13-2020

How To Send Email using Node.js
How To Send Email using Node.j...

Hello Friends, In this tutorial we will learn how to send email using node.js app. In this tutorial we will see send...

Read More

Jul-28-2021