How to install Jenkins on Linux Debian 11.3
To Install Jenkins On Linux Debian 11.3.
Introduction:
Jenkins is an open-source automation tool written in Java with plugins built for Continuous Integration purposes. Jenkins is used to build and test your software projects continuously making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build.
Installation procedure:
Step 1: Check the OS Version by using the below command.
root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
Step 2: Update the apt source list by using the below command.
root@linuxhelp:~# apt update
Get:1 http://security.debian.org/debian-security bullseye-security InRelease [44.1 kB]
Hit:2 http://deb.debian.org/debian bullseye InRelease
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [39.4 kB]
Hit:4 https://packages.sury.org/php bullseye InRelease
Hit:5 http://repo.mysql.com/apt/debian bullseye InRelease
Get:6 http://security.debian.org/debian-security bullseye-security/main Sources [131 kB]
Fetched 215 kB in 2s (115 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
Step 3: Jenkins requires Java 11 to run. Ensure that Java is installed in the right version before proceeding. If you get the error below, then we need to install java by using the below command.
root@linuxhelp:~# java -version
-bash: java: command not found
Step 4: Next, install the openjdk version of Java using the below command.
root@linuxhelp:~# apt install -y openjdk-11-jdk
Step 5: Confirm that the right version was installed by using the below command.
root@linuxhelp: java -version
openjdk version "11.0.13" 2021-10-19 OpenJDK Runtime Environment (build 11.0.13+8-post-Debian-1deb11u1) OpenJDK 64-Bit Server VM (build 11.0.13+8-post-Debian-1deb11u1, mixed mode, sharing)
Step 6: First add the key to your system by using the below commands.
root@linuxhelp: sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
Step 7: Then add a Jenkins apt repository by using the below commands.
root@linuxhelp: wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
Step 8: Update the apt source list by using the below commands.
root@linuxhelp:~# apt update
Get:1 http://security.debian.org/debian-security bullseye-security InRelease [44.1 kB]
Hit:2 http://deb.debian.org/debian bullseye InRelease
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [39.4 kB]
Hit:4 https://packages.sury.org/php bullseye InRelease
Hit:5 http://repo.mysql.com/apt/debian bullseye InRelease
Get:6 http://security.debian.org/debian-security bullseye-security/main Sources [131 kB]
Fetched 215 kB in 2s (115 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
Step 9: Finally install Jenkins by using the below command.
root@linuxhelp: apt-get install Jenkins
Step 10: Now that jenkins is installed, let us start by using the below command.
root@linuxhelp: systemctl start Jenkins
Step 11: Now Check the status from Jenkins by using the below command.
root@linuxhelp: systemctl status Jenkins
Step 12: Enable the Jenkins by using the below command.
root@linuxhelp: systemctl enable Jenkins
Step 13: Open the web browser and type localhost:8080 to enter into the Jenkins admin console page as shown in the below image.
Step 14: This is the Admin console page here we need to enter the password which was generated as shown in the below image.
Step 15: This is the page we can select the plugins to install.
Step 16: In this page we can see that the plugins are downloading.
Step 17: This is the page we can create admin user.
Step 18: This is the page we can customize the Jenkins URL.
Step 19: Now the Jenkins is ready to start.
Step 20: This is the welcome page of Jenkins which displays the given features.
Conclusion:
We have reached the end of this article. In this guide, we have walked you through the steps required to Install Jenkins On Linux Debian 11.3. Your feedback is much welcome.
working build script, e.g., a Maven script checked into the repository.
Jobs can be of different types like - freestyle projects, multi-configuration projects, pipeline projects, multi-branch projects, etc.