In this article, we will have explained the necessary steps to install and set up Jenkins on Debian 10. Before continuing with this tutorial, make sure you are logged in as a user with
sudo privileges. All the commands in this tutorial should be run as a non-root user.
Jenkins is an open-source automation server. It is used for building software or apps automatically, unit testing of different programming projects, and much more. It ships with numerous and handy plugins which help in continuous integration by enabling developers to make the necessary changes to applications before going into production.
Install Jenkins on Debian 10
Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.
sudo apt update sudo apt upgrade
Step 2. Install Java.
Jenkins requires Java 8 or Java 11. Here, I will install the default JRE package (OpenJDK):
sudo apt install default-jdk
You can verify the Java version with the following command:
Step 3. Install Jenkins on the Debian system.
First, add the Jenkins public key to the system:
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
Next, run the following command to add the Jenkins repository to your system:
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
Install Jenkins package using the
sudo apt update sudo apt install jenkins
After installing Jenkins, verify the status of Jenkins using the command below:
systemctl status jenkins
Step 4. Accessing Jenkins.
Access the Jenkins configuration utility by opening a web browser to the following address:
http://your_ip_address or your-domain:8080
When you first access a new Jenkins instance, you are asked to unlock it using an automatically generated password:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
You should see a 32 character long alphanumeric password:
Copy the password from your terminal, paste it into the Administrator password field and click Continue:
Next, click on the Install suggested plugins box, and the installation process will start immediately:
Once the installation is complete, you will be prompted to set up the first administrative user.
That’s all you need to do to install the Jenkins on Debian 10 Buster. I hope you find this quick tip helpful. For further reading on Jenkins, please refer to their official knowledge base. If you have questions or suggestions, feel free to leave a comment below.