INSTALL JENKINS ON UBUNTU 18.04


















Lets have a look on how to install and configure Jenkins on Ubuntu 18.04. Jenkins is a powerful open source plugin based automation server that helps to integrate your code and deliver to respected servers continuously.

CI & CD is a devops methodology in which team members regularly commit their code changes to the version control repository, after which automated builds and tests are run. Continuous delivery (CD) is a series of practices where code changes are automatically built, tested and deployed to production.

PREREQUESTIES:

Ubuntu server with at least 512MB RAM and 10 GB of Hard drive space

Installed JAVA (either JDK or JRE)

INSTALLING JAVA:

Jenkins is a self-contained java based program. So we must have to have java run time environment in our server

First step is to install Java, Here we are installing Java 8 OpenJDK package with folloing commands

$ sudo apt update
$ sudo apt install openjdk-8-jdk

Make sure Java 8 is the default java version in your server.

Add the Jenkins to debain repository

Import the GPG keys of the Jenkins repository

$ wget -q -O – https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add –

Add Jenkins repository to server

sudo sh -c ‘echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list’

Now install Jenkins by running

$ sudo apt update
$ sudo apt install jenkins

Verify the Jenkins service status after installing

$ systemctl status jenkins

Output will be

● jenkins.service – LSB: Start Jenkins at boot time
Loaded: loaded (/etc/init.d/jenkins; generated)
Active: active (exited) since Wed 2018-08-22 13:03:08 PDT; 2min 16s ago
Docs: man:systemd-sysv-generator(8)
Tasks: 0 (limit: 2319)
CGroup: /system.slice/jenkins.service

If you see the above thing CONGRATULATIONS!!! you have successfully configured Jenkins.