Main menu

Install Jenkins on a Linux Debian system

To install Jenkins on a Linux Debian system follow this guide

Step 1. Installing OpenJDK 7

To install OpenJDK 7 JRE and JDK, execute the following command:

sudo apt-get install openjdk-7-jre 
sudo apt-get install openjdk-7-jdk

Step 2. Installing Jenkins

Before we can install Jenkins, we have to add the key and source list to apt. This is done in 2 steps, first we'll add the key.

wget -q -O - | apt-key add -

Secondly, we'll create a sources list for Jenkins.

echo deb binary/ > /etc/apt/sources.list.d/jenkins.list

Now, we only have to update apt's cache before we can install Jenkins.

apt-get update

As the cache has been updated we can proceed installing Jenkins. Note that Jenkins has a big bunch of dependencies, so it might take a few moments to install them all.

apt-get install jenkins

Step 3. Configuring Jenkins

Now that Jenkins is running, go to your-server-ip-address:8080. You'll be welcomed by the default Jenkins screen.

You probably have to wait for some time to let Jenkins install itself.


After a while you'll be welcomed by the default Jenkins screen. Currently, the installation is insecure and everyone can access it. Lets fix that! First, go to Manage Jenkins (in the left menu) then click Setup Security on the page loaded.

Then enable the security by checking the box.

Set it to use Jenkins's own user database and disable sign ups.

Next, go for the Matrix-based security.

Make sure Anonymous only has the Read right under the View group (Jenkins could crash when it doesn't have that set).

Click save at the bottom of the page. After the page load, you'll see a login form, ignore that, go to again instead. You'll see this sign up form.

Sign up with a username and you'll be administrator of this fresh Jenkins install.


All done!