Installing Jenkins on Ubuntu 16.04

You may have heard or read articles regarding continuous integration and delivery and thought how exactly does one do that? Well, the simple answer is to constantly build your application when you add new code to the code base. This can become a tiresome task as builds may take time and if a code push breaks the application you may need to roll back the push entirely. This is where a platform such as Jenkins comes in. Jenkins is software that allows for continuous integration, which means that when a developer makes changes to the code base and pushes them, Jenkins will trigger a build of the application and run any test automatically. In this article, we will cover how to install Jenkins on your server. 

 

Prerequisites:

  •  Ubuntu server  

 

Update Ubuntu

Let’s start with making sure Ubuntu is up to date.

sudo apt-get update

 

Next, get the Jenkins source lists. 

sudo wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -

sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'

 

Install Jenkins

Update Ubuntu again and install Jenkins.

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install git
sudo apt-get install jenkins

 

Start Jenkins

Reboot your server, once it is back up, manually start the Jenkins service. 

sudo reboot
sudo service jenkins start

 

When Jenkins is up and running you can see the GUI interface by going to http://localhost:8080.

 

The default password is stored in

/var/lib/jenkins/secrets/initialAdminPassword

 

In this article, we have installed Jenkins on your server. In the next article, we will go more in-depth into setting up an application using Jenkins.   

Leave a Reply

Your email address will not be published. Required fields are marked *