Logo

dev-resources.site

for different kinds of informations.

How to install Jenkins in ubuntu

Published at
1/10/2025
Categories
jenkins
cicd
ubuntu
cicdpipeline
Author
bhaktraj
Categories
4 categories in total
jenkins
open
cicd
open
ubuntu
open
cicdpipeline
open
Author
8 person written this
bhaktraj
open
How to install Jenkins in ubuntu

What is Jenkins ?
Jenkins is an open source automation server which is used for continuous integration and continuous delivery in software development its help to automate the parts of software development related like building , testing, deploying and delivery the software

how you can install Jenkins on Ubuntu:
Step 1:
You need to read documentation of Jenkins that what are the minimum requirement for installing Jenkins
documentation link : https://www.jenkins.io/doc/book/installing/linux/

The point that are being in the knowledge.

  1. Which java version is required for which jenkins version first install that version of java

Jenkins java version as per jenkins version(source: Jenkins Documentation)

Step 2:
First Update your System:

sudo apt update
Enter fullscreen mode Exit fullscreen mode

Step 3;
install Java as per the requirement of Jenkins version
observe the picture

java version(source: Jenkins Documentation)

sudo apt install openjdk-21-jre-headless

Enter fullscreen mode Exit fullscreen mode

Step 4:
Now follow the documentation command

Jenkins documentation command (source: Jenkins Documentation)

sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \
  https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]" \
  https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null
Enter fullscreen mode Exit fullscreen mode

Step 5:
update it again

sudo apt-get update
Enter fullscreen mode Exit fullscreen mode

Step 6:
Install Jenkins

sudo apt-get install jenkins
Enter fullscreen mode Exit fullscreen mode

Step 7:
enable means start the service when machine is rebooted

sudo systemctl enable jenkins
Enter fullscreen mode Exit fullscreen mode

Step 8:

sudo systemctl start jenkins
Enter fullscreen mode Exit fullscreen mode

Now
Jenkins is install so open it with port 8080

and the password is at
/var/lib/jenkins/secrets/initialAdminPassword
it's mention in the browser

So use Cmd

sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Enter fullscreen mode Exit fullscreen mode

copy the password and paste it there in browser
and configure the setting that you need.

Script For Provisioning in cloud

#!/bin/bash
sudo apt update 
sudo apt install openjdk-21-jre-headless -y
sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \
  https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]" \
  https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins -y
sudo systemctl enable jenkins
sudo systemctl start jenkins
Enter fullscreen mode Exit fullscreen mode

Thanks

cicd Article's
30 articles in total
Favicon
From Bi-weekly to Every 5 Minutes: Modern Continuous Deployment Strategies
Favicon
Streamlining CI/CD with AWS CodePipeline and GitHub Actions: A DevOps Perspective
Favicon
Deploying a Next.js UI App on S3 Using Jenkins🀩
Favicon
How to install Jenkins in ubuntu
Favicon
6 Steps to Master PHPUnit Testing with Ease!
Favicon
Power Platform Connect to Git
Favicon
From Code to Cloud: Builds Next.js on GitHub Actions, straight to production
Favicon
Revolutionizing Software Supply Chain Security: Unlocking the power of GUAC and SBOM
Favicon
A Quick Overview of Delivery Manager Role in the Modern Enterprise SDLC Process (Software Development Life Cycle)
Favicon
Why CI/CD is important for DevOps?
Favicon
shiftleft custom framework
Favicon
Automating Node.js Dependency Upgrades and Build Error Resolution Using AI
Favicon
DevSecops Tools in CICD Pipeline
Favicon
My posts by technology
Favicon
To implement CI/CD for DevOps
Favicon
Insights into how DevOps can improve the speed and quality of software delivery
Favicon
[Boost]
Favicon
Git Integration: How Git Works with CI/CD, Docker, Kubernetes, Jenkins, and Terraform
Favicon
A Roadmap to AWS Amplify Gen2: Shifting Your Mindset from Gen1 to a Modern, AWS-Integrated Frontend CI/CD Platform
Favicon
CI/CD Pipeline Testing For Small Dev Teams.
Favicon
From days to minutes: Build and publish React Native apps using Fastlane and Github Actions
Favicon
Hi @All, I'm working devOps engineer in product based company and I want to is there any tool or way to get test cases from existing products as development from scratch is not possible on this stage to automate automation testing using Selenium Jenkins ?
Favicon
CI/CD pipeline
Favicon
What the hack are CI/CD pipelines?
Favicon
Identifying and Removing Unused Dependencies in pom.xml
Favicon
Automating DevOps with Bitbucket Pipelines – Configuring Triggers and Branch Protection Rules
Favicon
How to Deploy a Static Website to AWS S3 with Razorops CI/CD
Favicon
Make Makefiles Great Again: Why It’s Time to Bring Back the OG Workflow Boss
Favicon
What Happens Behind the .gitignore: How Git Handles Ignored Files
Favicon
Dumriya Live - AWS Oriented Full Stack Application Infrastructure Overview

Featured ones: