How to Install Jenkins on Ubuntu (Step-by-Step Guide)
If you're a developer or DevOps engineer, Jenkins is one of the most powerful tools you can have in your CI/CD pipeline. In this guide, we’ll walk through how to install Jenkins on an Ubuntu system from scratch — including the setup of Java, system services, and how to access the Jenkins dashboard.
📋 Prerequisites
Before diving in, make sure:
-
You're running Ubuntu 22.04 LTS or similar
-
You have sudo privileges
-
Your system has access to the internet
☕ Step 1: Install Java
Jenkins requires Java 17 or newer. Here’s how to install OpenJDK 17:
You can verify the installation:
📦 Step 2: Add Jenkins Repository
Jenkins isn’t in Ubuntu’s default repos, so you’ll need to add the Jenkins APT repo and its GPG key.
Update your package list:
🛠 Step 3: Install Jenkins
Now install Jenkins with:
🔌 Step 4: Start and Enable Jenkins
To start Jenkins and enable it to launch at boot:
Check status:
Jenkins runs on port 8080 by default.
🌐 Step 5: Access Jenkins
Open your browser and go to:
To unlock Jenkins:
Paste this into the setup wizard, install the recommended plugins, and create your first admin user.
⚙️ Optional: Change Jenkins Port
To change the port from 8080 to another:
Then add:
Save and reload:
✅ Conclusion
With Jenkins installed and running, you're ready to create your first pipeline, automate your deployments, and integrate with tools like GitHub, Docker, and Kubernetes.
Looking for Docker or Kubernetes installation instead? Let me know, and I’ll walk you through that too.
🔗 Official Jenkins Guide:
https://www.jenkins.io/doc/book/installing/linux/#ubuntu-debian
Comments
Post a Comment