As a fellow technology geek, I‘m excited to provide you with the most comprehensive guide possible for installing Jenkins on the top 3 operating systems. By the end, you‘ll have mastered Jenkins and be automating development workflows in no time!
Jenkins is an incredible open-source automation tool, but the documentation can sometimes be lacking. I aim to give you all the nitty-gritty details, expert insights, and data you need to become a Jenkins pro.
Let‘s get started, friend!
What is Jenkins? An Automation Server for Software Delivery
Jenkins is an automation server written in Java that allows continuous integration and delivery of software projects. According to the Jenkins project:
Jenkins is the leading open source automation server. Built with Java, it provides over 1700 plugins to support automation of all kinds of development workflows.
In other words, Jenkins automates repetitive development tasks to improve the speed and quality of software delivery.
Some key things Jenkins can do:
- Build and test software projects continuously.
- Run automated tests to catch bugs early.
- Deploy new versions of software.
- Monitor executions of repeated jobs.
- Integrate with virtually any development tool (Git, Docker, Kubernetes, etc).
It‘s a critical component of modern DevOps practices like continuous integration, continuous delivery and continuous deployment.
According to JetBrains‘ 2021 Developer Ecosystem survey, Jenkins has 52% adoption with developers, more than double the second most popular tool Azure DevOps:

Additionally, the CNCF 2021 survey found Jenkins was the most popular continuous integration tool:

So Jenkins is widely used by developers and companies to automate their software workflows. Installing it is the first step to leveraging its powerful capabilities!
Prerequisites: Installing Java Runtime
Since Jenkins is written in Java, it requires the Java runtime environment (JRE) to be installed on your system.
The minimum recommended version for Jenkins is Java 8, but Java 11 is ideal. Here‘s how to install Java on each operating system:
Windows
On Windows, download the Java installer from Oracle and run it.
Make sure to:
- Choose the JDK (Java Development Kit) package, not just the JRE. Jenkins requires the full JDK.
- Set the
JAVA_HOMEenvironment variable to point to your Java installation directory.
Alternatively, you can use Chocolatey to install via the command line:
choco install jdk11
Verify it installed correctly:
java -version
Ubuntu
On Ubuntu, run the following to install OpenJDK 11:
sudo apt update
sudo apt install openjdk-11-jdk
Check the installation with:
java -version
CentOS
For CentOS, install OpenJDK 11 using yum:
sudo yum install java-11-openjdk-devel
And verify:
java -version
Phew, we got Java installed! Now onto the fun part.
Installing Jenkins on Windows
Jenkins provides an MSI installer for Windows systems.
Here are the steps to install:
-
Download the latest
.msifile from https://www.jenkins.io/download/. -
Double click to launch the installer.

-
Accept the license agreement and click Next.
-
Choose the installation directory if you don‘t want the default
C:\Program Files\Jenkins. -
Select components to install. Default works.
-
When asked, provide administrator credentials to use for Jenkins.
-
Click Install and wait for it to complete.
-
Finally click Finish to exit the installer.
The Jenkins Windows installer is extremely straightforward. Within a few minutes, you‘ll have Jenkins installed and running as a Windows service.
Now let‘s check out installing on Linux.
Installing Jenkins on Ubuntu
Jenkins maintains an apt repository for Debian/Ubuntu systems, making install easy.
Follow these steps:
-
First, add the repository key:
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - -
Next, append the repository address:
sudo sh -c ‘echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list‘ -
Update apt:
sudo apt update -
Install Jenkins:
sudo apt install jenkins -
Start Jenkins as a service:
sudo systemctl start jenkins -
Verify it‘s running:
sudo systemctl status jenkins
On Ubuntu, the whole process takes less than 5 minutes. Jenkins is installed and ready to go!
Installing Jenkins on CentOS
The process is very similar on CentOS and RHEL-based distributions:
-
Get the yum repository configuration:
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo -
Import the GPG key:
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key -
Install Jenkins:
sudo yum install jenkins -
Enable and start Jenkins:
sudo systemctl enable jenkins sudo systemctl start jenkins -
Check status:
sudo systemctl status jenkins
And with that, Jenkins is ready to build your projects on CentOS!
Initial Jenkins Configuration
Once Jenkins is installed, we need to complete some initial configuration through the web UI before using it.
Here‘s an overview of what we‘ll do:
- Unlock Jenkins with admin password.
- Customize Jenkins with plugins.
- Create your first admin user.
- Configure security settings.
Let‘s go through each step.
1. Unlocking Jenkins
Browse to http://your_server_ip:8080 and you‘ll see:

To unlock Jenkins, get the auto-generated admin password from:
- Windows:
C:\Program Files\Jenkins\secrets\initialAdminPassword - Linux:
/var/lib/jenkins/secrets/initialAdminPassword
Copy this password and paste it into the field to continue.
2. Customizing Jenkins with Plugins
Next, Jenkins prompts you to install some plugins:

Plugins allow extending Jenkins‘ functionality. I recommend sticking with the suggested plugins to start.
Click Install and wait patiently for the installations to complete. Easy as pie!
3. Creating Your First Admin User
After plugins, you‘ll create your user account:

Enter your details and click Save and Continue.
4. Configuring Security Settings
Finally, confirm Jenkins‘ base URL and click Save and Finish:

Whew, that was easy! You‘ll now see the Jenkins dashboard:

The initial setup is complete. Time to start creating jobs and building awesome stuff!
Expert Tips for Jenkins Installation
Now that you know how to install Jenkins on your operating system of choice, here are some pro tips from my years of experience for a smooth installation process:
-
Use LTS releases – Jenkins releases both LTS (long-term support) and weekly versions. LTS versions are more stable – I recommend sticking with them.
-
Install via package manager – Whenever possible, use your system‘s package manager to install Jenkins instead of manual install. It handles auto-updates and dependencies for you.
-
Install plugins gradually – Don‘t install every Jenkins plugin under the sun upfront. Install plugins only when you need them. It keeps things simple.
-
Use reverse proxy – For security, put Nginx or Apache in front of Jenkins to reverse proxy it. Don‘t expose Jenkins directly.
-
Utilize configuration as code – Manage Jenkins configuration via code with the Configuration as Code plugin. It enables version control!
-
Monitor resource usage – Keep an eye on Jenkins resource consumption, especially memory. Install plugins judiciously to avoid bloat.
-
Backup regularly – Make sure you backup Jenkins home directory and configuration frequently. Disaster recovery is a must.
Following these best practices will ensure your Jenkins install remains maintainable and robust over the long term.
FAQs About Jenkins Installation
Let‘s go over some common questions about installing Jenkins:
Q: Do I need to install Jenkins on bare metal?
No, you can install Jenkins on a variety of platforms:
- Bare metal
- VMs
- Docker containers
- Kubernetes
- Cloud (AWS, GCP, Azure)
Q: Is Java the only dependency?
Yes, Java is the only hard dependency. Other build tools like Maven are optional.
Q: How do I choose which plugins to install?
Refer to the Jenkins plugin list and only install what you need. The essentials are Git, Pipeline, and Job DSL.
Q: Is Jenkins secure by default?
Not entirely – it‘s recommended to integrate Jenkins with LDAP, use role-based-access-control, and install security plugins.
Q: Does Jenkins work with Windows agents?
Yes, Jenkins works with Windows, Linux and macOS agents without issues. The master and agents don‘t have to match OS.
Q: What maintenance is required after installing Jenkins?
Regular tasks like backups, plugin and Jenkins core upgrades, ensuring Java is up-to-date, etc. Maintain just like any other server!
Closing Thoughts on Installing Jenkins
We covered a ton of ground here! By now, you should be a Jenkins installation expert, ready to setup Jenkins across Windows, Ubuntu, CentOS, and more.
The key takeaways around installing Jenkins are:
- Install Java runtime as prerequisite
- Get Jenkins package for your OS
- Run installation
- Complete initial security setup
While Jenkins has some complex capabilities, setting it up is straightforward. Within an hour, you can install and configure Jenkins to start building your projects.
Jenkins provides immense value for automating your development workflows. I hope you found this guide helpful and comprehensive for your Jenkins installation adventure! Let me know if you have any other questions.
Happy automating!