Install Jenkins on Ubuntu 18.04 Bionic Beaver Linux

Objective

The objective is to install Jenkins on Ubuntu 18.04 Bionic Beaver Linux

Operating System and Software Versions

  • Operating System: – Ubuntu 18.04 Bionic Beaver
  • Software: – Jenkins 2.89.4 or higher

Requirements

Privileged access to your Ubuntu System as root or via sudo command is required.

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

Other Versions of this Tutorial

Ubuntu 20.04 (Focal Fossa)

Instructions

Add Jenkins Repository

To start, first add Jenkins’s signing key and repository using the below commands:

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

next, make a choice whether you wish to install stable or latest Jenkins server version:

FOR STABLE JENKINS VERSION RUN:
$ sudo apt-add-repository "deb https://pkg.jenkins.io/debian-stable binary/"
FOR LATEST JENKINS VERSION RUN:
$ sudo apt-add-repository "deb http://pkg.jenkins-ci.org/debian binary/"


Install Jenkins

Once the repository is included, all what remains to install Jenkins on Ubuntu 18.04 is to execute:

$ sudo apt-get install jenkins

Login to Jenkins Server

To be able to login to the new Jenkins server installation first obtain an initial password:

$ sudo cat /var/lib/jenkins/secrets/initialAdminPassword
7c470b90ced24d8eb8ae1071ff38304d

Given that your Jenkins server can be accessed via eg. the jenkins-ubuntu host name, navigate your browser to url: http://jenkins-ubuntu:8080.

install jenkins ubuntu - initial login password

Enter your Jenkins initial password obtained by sudo cat /var/lib/jenkins/secrets/initialAdminPassword command.

Jenkins Server successfully installed - Ubuntu 18.04 Bionic Beaver

Jenkins Server successfully installed.