Last Updated on February 29, 2024 by cscontents
Introduction
Jenkins installation fairly simple, we need to follow right instructions. Before going through the Jenkins installation guide let’s see a brief introduction about jenkins.
Jenkins is an open source pipeline tool or automation server. It is one of the most powerful & widely used pipeline tool. We can use Jenkins for automation purpose by creating pipeline.
Jenkins is also known as CI tool (Continuous Integration tool). As a CI tool jenkins is very powerful, and it is widely used for continuous integration. Not only Continuous Integration (CI) tool, but Jenkins can also be used as Continuous Deployment or Delivery (CD) tool. Jenkins is used to created CI/CD pipeline which is one of the most popular automation concept in DevOps methodology which fasten software delivery process.
Jenkins is written in Java, so every time we need to install Java before installing Jenkins on any machine.
In this article we will see installation of Jenkins for various OS.
- Jenkins installation on Debian/ Ubuntu
- Jenkins installation on Fedora
- Jenkins installation on RHEL/ CentOS
- Jenkins installation on macOS – Official documentation is attached
- Jenkins installation on Windows – Official documentation is attached
Prerequisite Setup
To complete this tutorial, you would need below –
You should have one machine where you want to install Jenkins.
In case of Linux/Windows machine, below are the specification –
- The machine should have below minimum hardware spec –
- RAM – 256 MB
- Drive space – 1 GB
- If you plan to use the Jenkins in a small team, then below are hardware spec –
- RAM – 4 GB+
- Drive space – 50 GB+
Jenkins installation on Debian/ Ubuntu
Before installing jenkins we need to install Java.
Java installation on ubuntu
Execute the below commands one by one to install Java.
# Run apt update command.
sudo apt update
# Install OpenJDK
sudo apt install openjdk-11-jre
# Check the java version
java -version
Jenkins installation
Run the below commands one by one to install jenkins.
# Add the LTS release of Jenkins from debian-stable apt repository
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo tee \ /usr/share/keyrings/jenkins-keyring.asc > /dev/null
# Append the debian package repository in the sources.list
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
# Run apt update command.
sudo apt update
# Install jenkins
sudo apt install jenkins
# Start Jenkins service
sudo systemctl start jenkins
# Check the status of Jenkins service
systemctl status jenkins
Jenkins installation on Fedora
Before installing jenkins we need to install Java.
Java installation on Fedora
Execute the below commands one by one to install Java.
# Run the dnf upgrade command.
sudo dnf upgrade
# Install Java
sudo dnf install java-11-openjdk
# Check the java version
java -version
Jenkins installation
Run the below commands one by one to install jenkins.
# Download and install the LTS release branch from redhat-stable repository.
sudo wget -O /etc/yum.repos.d/jenkins.repo \ https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
# Run the dnf upgrade command.
sudo dnf upgrade
# Run the below commands.
sudo systemctl daemon-reload sudo systemctl start jenkins sudo systemctl status jenkins
Jenkins installation on RHEL/ CentOS
Before installing jenkins we need to install Java.
Java installation on RHEL/ CentOS
Execute the below commands one by one to install Java.
# Run the yum upgrade command.
sudo yum upgrade
# Install Java
sudo yum install java-11-openjdk
# Check the java version
java -version
Jenkins installation
Run the below commands one by one to install jenkins.
# Download and install the LTS release branch from redhat-stable repository
sudo wget -O /etc/yum.repos.d/jenkins.repo \ https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
# Run yum upgrade command.
sudo yum upgrade
# Install jenkins
sudo yum install jenkins
# Run the below commands.
sudo systemctl daemon-reload sudo systemctl start jenkins sudo systemctl status jenkins
Jenkins installation on macOS
To install jenkins on macOS, please follow the below official document.
https://www.jenkins.io/doc/book/installing/macos/
Jenkins installation on Windows
To install Jenkins on Windows, please follow the below official document.
https://www.jenkins.io/doc/book/installing/windows/
Thank You.
If you are interested in learning DevOps, please have a look at the below articles, which will help you greatly.
- Kubernetes Series: Part 1 – Introduction to Kubernetes | Background of Kubernetes
- Kubernetes Series: Part 2 – Components of Kubernetes cluster | Kubernetes cluster in detail
- Kubernetes Series: Part 3 – What is Minikube and How to create a Kubernetes cluster (on Linux) using Minikube?
- Introduction to Azure DevOps – High level information
- Introduction to Ansible | High Level Understanding of Ansible
- Basics of automation using Ansible | Automate any task
- 10 frequently used ansible modules with example
- Jenkins Pipeline as code – High level information
- What is End-to-End Monitoring of any web application and Why do we need it?
- DevOps Engineer or Software Developer Engineer which is better for you?- Let’s discuss
- How To Be A Good DevOps Engineer?
- How to do git push, git pull, git add, git commit etc. with Bitbucket