Jenkins Installation and Configuration

Jenkins Installation and Configuration

Configure Jenkins on Ubuntu

Jenkins is an open-source automation server that helps automate the software development process. It is used for building, testing, and deploying software. It helps developers catch bugs early and release software faster.

Some of the Benefits are:

  • Easy to install and configure

  • Platform independent

  • Automates integration

  • Detects errors early

  • Rich plugin ecosystem

  • Open source

  • Great community support

  • Easy distribution

Now, Let's begin the installation processes.

There are several steps to configure Jenkins on an Ubuntu machine:

  1. Install Java:

Jenkins requires Java to run, so you'll first need to install OpenJDK. For Ubuntu 20.04 and later, install OpenJDK 11:

sudo apt install openjdk-11-jre
  1. Add the Jenkins repository:

It's recommended to install Jenkins from the official Jenkins repository instead of the Ubuntu repository. This ensures you have the latest version.

curl -fsSL | sudo tee \
  /usr/share/keyrings/jenkins-keyring.asc > /dev/null

sudo sh -c 'echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] binary/ > /etc/apt/sources.list.d/jenkins.list'
  1. Install Jenkins:
sudo apt update
sudo apt install jenkins
  1. Start Jenkins:
sudo systemctl start jenkins
  1. Open the firewall to port 8080:
sudo ufw allow 8080
  1. Access Jenkins in your browser at http://localhost:8080

  2. Get the initial admin password:

sudo cat /var/lib/jenkins/secrets/initialAdminPassword
  1. Paste the password, choose plugins, and create your admin user.

  2. Start using Jenkins! You can install more plugins, set up jobs, and configure your CI/CD pipelines.

Congratulations!! start your CICD journey.