12 C
Texas
angeloma
Senior Writer and partner

How to install Jenkins on Debian 10?

Jenkins is a fantastic application that automates application processes on a server. It is written in Java and therefore compatible with many Linux distributions. So, in this post, you will learn how to install Jenkins on Debian 10.

Continuous integration and Jenkins

In a production environment, the software is developed and compiled frequently. In addition to this, it needs to be tested quite a few times. With each change in the source code, it is necessary to start the whole process over again.

Jenkins automates all these tasks quickly and easily. So, the process where all the changes and functions of the application in development are automatically verified is called continuous integration.

In this sense, using Jenkins the developer will know at all times the status of his application. Failures, new features, and processes will be automated and monitored with Jenkins.

Install Jenkins on Debian 10 Buster

- Advertisement -

One of the great advantages of Jenkins is that it is cross-platform. This is because it is built in Java. Therefore, it can be installed on almost all Linux distributions without any problems. Of course, also in Debian 10.

However, there are some small things to keep in mind. First of all, it is necessary to have a user with sudo or to be root users.

Read how to enable sudo on Debian 10?

On the other hand, you have to have Java installed and know how to use the terminal. So, let us start.

1) Install Java on Debian 10

First of all, you must have Java installed. This is vital because Jenkins is made in Java. So open a terminal and run the following command:

:~$ sudo apt install default-jre default-jdk

Then, check the Java version.

:~$ java --version
openjdk 11.0.3 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+7-post-Debian-5)
OpenJDK 64-Bit Server VM (build 11.0.3+7-post-Debian-5, mixed mode, sharing)

Now, Java is correctly installed.

2) Add the Jenkins repository on Debian 10

Jenkins is a vital program in professionally deploying software. So, to install it, it requires a safe and reliable method from Jenkins developers. For this purpose and to facilitate the installation, they have made available a software repository.

So, add it to our Debian 10 Buster. First, install some necessary packages:

:~$ sudo apt install apt-transport-https wget gnupg

Then, add the GPG key for the repository.

:~$ wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
OK

Now add edit the file /etc/apt/sources.list and add the following. To do this, I will use the nano text editor.

:~$ sudo nano /etc/apt/sources.list
deb https://pkg.jenkins.io/debian-stable binary/

Next, save the changes (CTRL + O) and close the file (CTRL +X).

3) Install Jenkins on Debian 10 (I)

Then, refresh APT and install Jenkins on Debian 10 using the following commands:

:~$ sudo apt update
:~$ sudo apt install jenkins

1.- Install Jenkins on Debian 10 Buster
1.- Install Jenkins on Debian 10 Buster

You can check the service status by running this command:

:~$ sudo systemctl status jenkins

2.- Jenkins status on Debian 10
2.- Jenkins status on Debian 10

As you can see, the service is running smoothly. Now, you need to get the default superuser key. To do this, run this command:

:~$ sudo cat /var/lib/jenkins/secrets/initialAdminPassword
6dcefe440e474daea0f4b85ace1ad954

Now, complete the installation using the web browser.

3) Install Jenkins on Debian 10 (II)

Now we have to go to the server and complete the installation. Open your web browser and go to http://server-ip:8080 Remember that Jenkins uses port 8080 by default. You will see this. Just, type the root password and continue.

3.- Default password screen
3.- Default password screen

Then, create the admin user.

4.- Creating the admin user
4.- Creating the admin user

After that, you can choose the plugins you want to activate. Whether they are suggested or others.

5.- Customize Jenkins installation
5.- Customize Jenkins installation

6.- Select the plugins you want to install
6.- Select the plugins you want to install

Then, after a couple of confirmation and information windows. You will be on the Jenkins dashboard.

7.- Jenkins Dashboard
7.- Jenkins Dashboard

Enjoy it. 😀

Conclusion

In this post, you have learned to install Jenkins on Debian 10, Buster. It is a pretty good application for continuous integration processes. So the processes inherent to the software development can be automated giving the developer truthful and accurate information about the process.

Please share this post and join our Telegram channel.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article