How to Install Jenkins on Ubuntu 16.04

r00t October 3, 2017

Install Jenkins on Ubuntu 16.04

In this tutorial we’ll learn how to install Jenkins on Ubuntu 16.04. We will also install and configure its prerequisites. Jenkins is the most widely used open source constant integration and automation machine. It provides a huge variety of neighborhood plug-ins to encourage construction, deploying and automating any project, large or little.

I recommend to use a minimal Ubuntu server setup as a basis for the tutorial, that can be a virtual or a root server image with an Ubuntu 16.04 minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.

Install Jenkins on Ubuntu 16.04

Step 1. First, ensure your system and apt package lists are fully up-to-date by running the following:

apt-get update -y
apt-get upgrade -y

Step 2. Installing Java.

Jenkins requires Java, Install OpenJDK8 on the server:

sudo apt-get install openjdk-8-jre-headless -y

Now verify that it installed:

java -version

Step 3. Installing Jenkins.

First, add Jenkins repository as the Jenkins is not available on Ubuntu 16.04 base repositories.

Add the Jenkins key to the system:

sudo apt-key add

Add the Jenkins repository information on your system:

echo "deb binary/" | sudo tee /etc/apt/sources.list.d/jenkins.list

Update repository and install Jenkins:

sudo apt-get update
sudo apt-get -y install jenkins

Run the following systemctl commands to start and enable the jenkins service:

systemctl start jenkins
systemctl enable jenkins

After the installation, we need to allow port 80 & 8080 on the firewalld of the system. Run:

firewall-cmd --permanent --add-port=8080/tcp
firewall-cmd --reload

Step 4. Access the Jenkins Web portal.

Now, access the Jenkins using the below address from your web browser:


Congratulation’s! You have successfully install and configured Jenkins on your Ubuntu 16.04 server. Thanks for using this tutorial for installing Jenkins on Ubuntu 16.04 LTS (Xenial Xerus) system.

The Tags:

Leave a Comment

Comments are closed.