The objective is to install Jenkins on Debian 9.
Operating System and Software Versions
- Operating System: - Debian 9 Stretch
- Software: - Jenkins 2.46.3
Privileged access to your Debian system will be required.
- # - requires given linux commands to be executed with root privileges either directly as a root user or by use of
- $ - requires given linux commands 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
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:
SUBSCRIBE NEWSLETTER & RSS
Subscribe to RSS and NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.
# echo "deb http://pkg.jenkins-ci.org/debian binary/" > /etc/apt/sources.list.d/jenkins.list
With that done, update repository index:
# apt update
Now, that APT repositories are in place, the installation of Jenkins is rather simple one-liner:
# apt install jenkins
Jenkins is now installed. Rertieve your initial Jenkins password:
# cat /var/lib/jenkins/secrets/initialAdminPassword
Once you have your password, navigate your browser to
and proceed with additional wizard customisation.