Site icon GetCodify

How to install Jenkins in Ubuntu/Linux

food city man love

Photo by RealToughCandy.com on Pexels.com

Jenkins is an open-source automation server. Continuous integration and continuous delivery are made possible by automating the software development processes of developing, testing, and deploying. It is a server-based program that runs on Apache Tomcat or another servlet container.

Prerequisites:

Here’s a step-by-step guide to installing Jenkins:

  1. Update the repository for packages:
sudo apt update
  1. Install Java:
sudo apt install openjdk-11-jre

#verify java instllation

java -version

  1. Add Jenkins Repository and Key:
wget -q -O - https://pkg.jenkins.io/debian/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'
  1. Install Jenkins:
sudo apt update
sudo apt install jenkins

Jenkins installation is complete in Linux/Ubuntu

  1. Start and Enable Jenkins:
sudo systemctl start jenkins
sudo systemctl enable jenkins
  1. Open the firewall port, if necessary:
sudo ufw allow 8080
  1. Launch the Jenkins Web Interface:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword

#Copy the password and paste it into the Jenkins web interface to unlock Jenkins.
  1. Install Recommended Plugins:
  1. Create an Administrator User:
  1. Setup Jenkins:

That’s all! Jenkins has been installed successfully on your Ubuntu server. You may use your web browser to access Jenkins and begin configuring your CI/CD pipelines and tasks to automate your development processes.

Exit mobile version