How to Install Jenkins on Debian 9 Stretch Linux

How to Install Jenkins on Debian 9 Stretch Linux

In this tutorial I will show you, how to install Jenkins on Debian 9 Stretch Linux.

  • # – requires given command to be executed with root privileges either directly as a root user or by use of sudo command
  • $ – given command to be executed as a regular non-privileged user

Inlcude Jenkins APT repository

First step is to include Jenkins APT repository and key. Let’s start by adding a new key:

# wget -q -O - http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key | apt-key add 
OK

Next, add a repository. Here we have two options. First, we can add a stable LTS Jenkins repository:

# echo "deb http://pkg.jenkins-ci.org/debian-stable binary/" > /etc/apt/sources.list.d/jenkins.list

Another option is to inlcude latest Jenkins version repository:

# echo "deb http://pkg.jenkins-ci.org/debian binary/" > /etc/apt/sources.list.d/jenkins.list

With that done, update repository index:

# apt update

Install Jenkins

Now, that APT repositories are in place, the installation of Jenkins is rather simple one-liner:

# apt install jenkins

Access Jenkins

Jenkins is now installed. Rertieve your initial Jenkins password:

# cat /var/lib/jenkins/secrets/initialAdminPassword
b9b1649e223843e29cf17812a2322a3f

Once you have your password, navigate your browser to http://jenkins-server-IP:8080 and proceed with additional wizard customization.

 
Enjoyed this video?
How to Install Jenkins on Debian 9 Stretch Linux
"No Thanks. Please Close This Box!"