Objective

The objective is to install Jenkins on Debian 9.

Operating System and Software Versions

  • Operating System: - Debian 9 Stretch
  • Software: - Jenkins 2.46.3

Requirements

Privileged access to your Debian system will be required.

Difficulty

EASY

Conventions

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

Instructions

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:

SUBSCRIBE TO NEWSLETTER
Subscribe to Linux Career 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

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 customisation.
jenkins install debian stretch 9
FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in: