Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Debian 8 - Install Jenkins

Jenkins is an open source continuous integration tool written in Java and released under the MIT License. It is a server-based system running in a servlet container such as Apache Tomcat. It supports source control management tools including AccuRev, CVS, Subversion, Git, Mercurial, Perforce, Clearcase and RTC, and can execute Apache Ant and Apache Maven based projects as well as arbitrary shell scripts and Windows batch commands.

LTS Release Installation

# Add the key to your system.
wget -q -O - http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key | sudo apt-key add -
echo "deb http://pkg.jenkins-ci.org/debian-stable binary/" | sudo tee -a /etc/apt/sources.list

# Update and install jenkins
sudo apt-get update
sudo apt-get install jenkins -y

sudo service jenkins restart

Alternatively, you can download a debian package from their LTS download page and install from that.

Latest Stable Release

# Add the key to your system.
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
echo "deb http://pkg.jenkins-ci.org/debian binary/" | sudo tee -a /etc/apt/sources.list

# Update and install jenkins
sudo apt-get update
sudo apt-get install jenkins -y

sudo service jenkins restart

Alternatively, you can manually download a debian package from their latest releases download page and install from that.

Accessing Jenkins

You can now access Jenkins by navigating to http://[Jenkins Server IP]:8080 in your browser. It can take a while for Jenkins to start, so don't worry if you get a "page cannot be displayed" error right after installation.

References

Last updated: 16th April 2021
First published: 16th August 2018