How do I set up Jenkins on Linux

Setting Up Jenkins on Linux

Jenkins is an open-source automation server that enables developers to automate the building, testing, and deploying of software. Follow these steps to set it up on a Linux system.

Step 1: Update Your System

Before installing Jenkins, ensure that your system is updated:

sudo apt update sudo apt upgrade

Step 2: Install Java

Jenkins requires Java to run, so install OpenJDK:

sudo apt install openjdk-11-jdk

Step 3: Add Jenkins Repository

Add the Jenkins repository to your package manager:

wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add - echo deb http://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list

Step 4: Install Jenkins

Now, update your package manager again and install Jenkins:

sudo apt update sudo apt install jenkins

Step 5: Start Jenkins

Start the Jenkins service and enable it to run on startup:

sudo systemctl start jenkins sudo systemctl enable jenkins

Step 6: Access Jenkins

Open your web browser and navigate to:

http://localhost:8080

Follow the on-screen instructions to finish setting up Jenkins.


Jenkins automation server Linux installation DevOps CI/CD