How To Install Jenkins on Ubuntu 16.04

In this tutorial you will learn what Jenkins server is and how quickly deploy install Jenkins on Ubuntu 16.04.

What is Jenkins?

Jenkins is a most popular Continuous Integration (CI) and Continuous delivery tool for software deployment. The basic functionality of Jenkins is to execute a predefined list of steps on server that is use to deploy any application on production environment. Deployment of application using Jenkins is very fast and almost not breakable.

What is Continuous Integration?

Continuous Integration means when a developer built a software or application written in any language, they commit their codes in repository server, after Jenkins pull the codes from repository and next deploy build on stage environment when the application test is passes on staging server it finally pushed on production server. So, this commit, build, test, and deploy process is called continuous integration/deployment.

Firstly install Java
Install PPA for java installation
$ sudo add-apt-repository ppa:webupd8team/java

Type in your password when it asks and hit Enter.

Update package manager and install java installer
$ sudo apt update
$ sudo apt install oracle-java8-installer

Check Java Version
$ java –version

Set Java environment variables
$ sudo apt install oracle-java8-set-default

Java is installed successfully in system, next install Jenkins in system.

Install Jenkins
add Jenkins repository in system
$ wget -q -O – https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add –

When the key is added, the system will return OK. Next, we’ll append the Debian package repository address to the server’s sources.list file.

$ echo deb https://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list

Run command to update repository
$ sudo apt-get update

Finally, install Jenkins package
sudo apt-get install jenkins

Start Jenkins Service
$ sudo systemctl start jenkins

Enable Jenkins server on boot
sudo systemctl enable jenkins

Check Jenkins running status
$ sudo systemctl status jenkins

Now, Jenkins is installed in system. By default jenkins work on 8080 port. Access server URL on your web browser using server ip address or domain name to complete the Jenkins installation.
URL http://server_ip_address:8080

Now setup Jenkins login
You will get the below screen and you will need to unlock the Jenkins Screen.

Open the terminal and cat the file to display the password.

$ sudo cat /var/lib/jenkins/secrets/initialAdminPassword

Copy the printed password and past in Administrator password box and click to Continue.

Next, click on Install Suggested Plugins and this will install the required plugins automatically from internet.

Next, click on Install Suggested Plugins and this will install the required plugins automatically from internet.

Now the suggested plugins installed in system successfully, Next fill user details for Jenkins login.

Next, click to “Jenkins is ready!” on screen to get the Jenkins login page.

login in to Jenkins account

Finally we logged in to Jenkins

That’s it for Jenkins installation in this tutorial, we will be posting more industrial based Jenkins tutorial in our next tutorial, If you have any query or requirement, please comment in below section.

Leave a Reply

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

*
*