Saturday 17 September 2016

How to Install Jenkins in Ubuntu 16.04 LTS

Well, I have been using Jenkins for sometimes so tried setting up in my system running Ubuntu 16.04 LTS. The installation process for Jenkins in Ubuntu 16.04 is easy and do not requires much of skills. Let's see how we can install Jenkins in Ubuntu 16.04 Xenial Xerus. 

Before you install Jenkins, I would suggest you to install Java 8 in Ubuntu 16.04.

For those who are not aware what Jenkins is, it is a Continuous Integration and Software Delivery Tool by which you can build and test your software projects continuously. It is open source and has a large community support. It's used as a build tool for most of the continuous development projects and is one of the best tools for it. 

The easiest way to Install Jenkins in any OS is by downloading Jenkins war file from here and running the command java -jar jenkins.war to run it. But in this article for Installing Jenkins in Ubuntu 16.04, we will see the graphical way to install and configure it. I am installing Jenkins 2.7.4.

The first step is to download and install Jenkins. Open Terminal by pressing Ctrl + Alt + T and type in the following commands:

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

sudo sh -c 'echo deb binary/ > /etc/apt/sources.list.d/jenkins.list' 

sudo apt-get update 

sudo apt-get install jenkins

This will download and install Jenkins. Along with that, this will also open Jenkins as a daemon process on start up. A new user is created "jenkins" to manage things up. 

Once you are finished up, open a browser and type in localhost:8080 in the URL. Jenkins is hosted on port 8080 by default. We can configure that later. On the Getting started screen, it will ask for a password. 

This password can be extracted from the Jenkins log file which can be found at /var/log/jenkins/jenkins.log

Once you are logged in, Customize Jenkins option will appear. You can ask Jenkins to install the suggested Plug ins , or you can select them manually according to your need. 

Once the plugins are downloaded and install, you are all set to use the Jenkins in Ubuntu 16.04. But before that, the Set Up will ask you to create first admin user. Fill in the details that you can use as an Admin to use and Manage Jenkins instance. 

Once done, you are presented with the Jenkins homescreen, something like this. 

If you want to make further changes, click on "Manage Jenkins" in the sidebar, then click on Manage Jenkins again and you will see all the configuration options. The first thing I did was changing the Jenkins URL to something like localhost:8080/jenkins. There are other various customization and configuration things which you can explore and set things up.

This is the easiest way to install Jenkins in Ubuntu 16.04 . I will soon be covering other aspects related to Jenkins. Thanks for reading by!

You can read more about Jenkins at


Post a Comment