Monday, March 10, 2025

Installing Jenkins: Step-by-Step Guide for Windows, Mac, and Linux

 

Installing Jenkins: Step-by-Step Guide for Windows, Mac, and Linux


After understanding what Jenkins is and why it’s important for DevOps, the next step is to install it on your system. Jenkins is highly flexible and can be installed on Windows, macOS, and Linux with ease.

In this guide, we will cover:
System requirements for Jenkins
Installing Jenkins on Windows
Installing Jenkins on macOS
Installing Jenkins on Linux (Ubuntu/Debian & RedHat/CentOS)
Initial setup and first-time configuration


🌍 Shape Your Future with AI & Infinite Knowledge...!!

🌐 Want to Generate Text-to-Voice, Images & Videos? 👉 http://www.ai.skyinfinitetech.com 📚 Read In-Depth Tech & Self-Improvement Blogs 👉 http://www.skyinfinitetech.com ▶ Watch Life-Changing Videos on YouTube 👉 https://www.youtube.com/@SkyInfinite-Learning  

🔥 Transform Your Skills, Business & Productivity – Join Us Today! 🔥System Requirements for Jenkins

Before installing Jenkins, ensure your system meets the minimum requirements:

💻 Hardware Requirements:

  • RAM: At least 4GB (8GB recommended for larger workloads)
  • CPU: 2 cores (4+ recommended for better performance)
  • Disk Space: At least 10GB free space


🛠 Software Requirements:

  • Java (JDK 11 or later) – Required for running Jenkins
  • Web Browser – Chrome, Firefox, or Edge for accessing the Jenkins dashboard


1️⃣ Installing Jenkins on Windows

Follow these steps to install Jenkins on Windows:

Step 1: Download Jenkins

🔹 Go to the official Jenkins website and download the Windows installer (.msi file).


Step 2: Install Jenkins

✅ Run the Jenkins.msi file and follow the installation wizard.
✅ Choose an installation directory (default is fine).
✅ Select the Run as a Windows Service option.


Step 3: Start Jenkins & Unlock

1️⃣ Once installed, open a browser and go to http://localhost:8080
2️⃣ Enter the initial Administrator password (found in C:\ProgramData\Jenkins\secrets\initialAdminPassword)
3️⃣ Follow the on-screen instructions to complete the setup.

📌 Jenkins is now installed and running on Windows!



2️⃣ Installing Jenkins on macOS

For Mac users, Jenkins can be installed using Homebrew.

Step 1: Install Homebrew (if not already installed)

Run the following command in the Terminal:


/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"


Step 2: Install Jenkins


brew install jenkins-lts


Step 3: Start Jenkins


brew services start jenkins-lts


Step 4: Access Jenkins

Open your browser and go to http://localhost:8080, then follow the initial setup steps.

📌 Jenkins is now installed on macOS!



3️⃣ Installing Jenkins on Linux (Ubuntu/Debian & CentOS/RHEL)

For Ubuntu/Debian

1️⃣ Update packages & install Java


sudo apt update && sudo apt install openjdk-11-jdk -y


2️⃣ Add Jenkins repository & install Jenkins


wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' sudo apt update && sudo apt install jenkins -y


3️⃣ Start & Enable Jenkins


sudo systemctl start jenkins sudo systemctl enable jenkins


4️⃣ Access Jenkins at http://localhost:8080

📌 Jenkins is now installed on Ubuntu/Debian!



For CentOS/RHEL

1️⃣ Install Java


sudo yum install java-11-openjdk -y


2️⃣ Add Jenkins 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


3️⃣ Install Jenkins & Start Service


sudo yum install jenkins -y sudo systemctl start jenkins sudo systemctl enable jenkins


4️⃣ Access Jenkins at http://localhost:8080

📌 Jenkins is now installed on CentOS/RHEL!



4️⃣ Initial Setup & Configuration

Once Jenkins is installed, follow these final setup steps:

Unlock Jenkins – Use the password from /var/lib/jenkins/secrets/initialAdminPassword
Install Recommended Plugins – Select default plugins to get started quickly
Create Admin User – Set up an admin account for better security
Configure Jenkins URL – Set the correct server URL for Jenkins

📌 Jenkins is now fully set up and ready to use!

No comments:

Post a Comment

Terraform State Deep Dive: Why it's Crucial and How to Manage It

Terraform State Deep Dive: Why it's Crucial and How to Manage It ...