Jenkins Setup: Simple Installation Steps
Imagine if your daily tasks were automatedโyour morning coffee prepared automatically, emails sent while you sleep, or reminders popping up when you need them. Sounds awesome, right? ๐คฉ
Jenkins is like your virtual assistant, but for developers! ๐จโ๐ป๐ฉโ๐ป Itโs an open-source automation tool designed to make your software development life easier by automating repetitive tasks like building, testing, and deploying code. This helps you focus on writing great code while Jenkins takes care of the boring stuff! ๐๏ธ
In the DevOps world, Jenkins is a superhero ๐ฆธ that ensures your code moves smoothly from development to production without breaking a sweat. ๐ช
But before we can unleash its power, we need to install it. ๐ ๏ธ And guess what? Installing Jenkins is as easy as making a cup of instant coffee โ (well, almost ๐). In this blog, weโll walk through how to install Jenkins on different operating systems.
So, grab your favorite snack ๐ฟ and letโs dive into the exciting world of Jenkins installation! ๐
๐ Prerequisites Before Installing Jenkins
Before we dive into installing Jenkins, letโs make sure your system is ready to host this automation hero! Here's a quick checklist ๐:
1. Java โ (Jenkins runs on Java!)
- Windows / macOS / Ubuntu / Red Hat:
Download and install Java 11 or 17.
How to check if Java is installed:
Open your terminal (Command Prompt, Terminal, or Shell) and run:
java -version
If you see something like Java 11.0.x
, youโre good to go! โ
Otherwise, youโll need to install Java.
2. Hardware Requirements ๐ฅ๏ธ
Minimum 256 MB of RAM (But hey, give it more if you can! ๐ช)
Minimum 1 GB of disk space for Jenkins and all the amazing plugins you'll install.
๐ช Ready? Letโs Install Jenkins! ๐ฅ๏ธ
Hereโs how you can install Jenkins on any OS in a few simple steps. Pick your OS and letโs get started!
1๏ธโฃInstalling Jenkins on Ubuntu๐ง
Update the System:
sudo apt update sudo apt upgrade
Install Java:
sudo apt install openjdk-11-jdk
Add Jenkins Repository:
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee \ /usr/share/keyrings/jenkins-keyring.asc 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
Update and Install Jenkins:
sudo apt update sudo apt install jenkins
Start Jenkins:
sudo systemctl start jenkins
Access Jenkins:
Open your browser and go to:http://localhost:8080
After accessing Jenkins on your browser:
Unlock Jenkins:
Enter the initial admin password found in:sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Install Suggested Plugins or customize your installation.
Create the first admin user and start using Jenkins.
2๏ธโฃInstalling Jenkins on Red Hat / CentOS๐ง
Update the System:
sudo yum update
Install Java:
sudo yum install java-11-openjdk
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
Install Jenkins:
sudo yum install jenkins
Start Jenkins:
sudo systemctl start jenkins
Enable Jenkins to Start on Boot:
sudo systemctl enable jenkins
Access Jenkins:
Open your browser and visit:http://localhost:8080
After accessing Jenkins on your browser:
Unlock Jenkins:
Enter the initial admin password found in:sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Install Suggested Plugins or customize your installation.
Create the first admin user and start using Jenkins.
3๏ธโฃInstalling Jenkins on macOS๐
Install Homebrew (if you donโt have it already):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install Jenkins:
brew install jenkins-lts
Start Jenkins:
brew services start jenkins-lts
Access Jenkins:
Open your browser and visit:http://localhost:8080
After accessing Jenkins on your browser:
Unlock Jenkins:
Enter the initial admin password found in:cat /var/lib/jenkins/secrets/initialAdminPassword
Install Suggested Plugins or customize your installation.
Create the first admin user and start using Jenkins.
4๏ธโฃInstalling Jenkins on Windows๐ฅ๏ธ
Download Jenkins:
Head to the official Jenkins website ๐ here and download the Windows Installer (.msi).Run the Installer:
Double-click the.msi
file and follow the friendly installation wizard. ๐งStart Jenkins:
Once installed, Jenkins will start as a Windows Service. Open your browser and go to:http://localhost:8080
Unlock Jenkins:
Jenkins will ask for a password located in this file:C:\Program Files (x86)\Jenkins\secrets\initialAdminPassword
Copy and paste the password, and youโre ready! ๐
๐ต๏ธโโ๏ธ Check Jenkins Version
After installing Jenkins, you can check the version to ensure everything is up-to-date:
Open your terminal and run:
jenkins --version
You should see something like:
Jenkins 2.x.x
๐ Congratulations!
Youโve successfully installed Jenkins on your system! ๐ Now, itโs time to explore Jenkins, set up your first job, and let automation make your life easier! ๐
Stay tuned for more DevOps magic! โจ Happy Automating! ๐จโ๐ป๐ฉโ๐ป
Letโs connect on LinkedIn and keep the learning going! ๐
๐ ๐๐ก๐๐๐ค ๐จ๐ฎ๐ญ ๐ฆ๐ฒ ๐๐ฎ๐ฅ๐ฅ ๐ฃ๐จ๐ฎ๐ซ๐ง๐๐ฒ: