Install Jenkins On Ubuntu 18.04/16.04

Install Jenkins On Ubuntu 18.04/16.04

Jenkins is automation tool for continuous integration and continuous deployment. In the following steps i will show you how to install jenkins on ubuntu 18.04/16.04. Jenkins requires Java 8, so let’s install jave 8. Before going to install java Update repository list then install java8.

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

Add the Jenkins Repository To Install Jenkins on Ubuntu 18.04/16.04

Jenkins provides its own repository for Linux systems. Add the Jenkins repository to your server with following commands.

sudo wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'

Install Jenkins on Ubuntu 18.04/16.04

Once the Jenkins repository is enabled, update the repository and install the latest version of Jenkins by using below commands.

sudo apt update
sudo apt install jenkins

Start the Jnekins service

start the jenkins service by using using below command.

systemctl start jenkins

Verify the jenkins status with below command.

systemctl status jenkins

root@ip-10-0-0-28:~# systemctl status jenkins
? jenkins.service - LSB: Start Jenkins at boot time
   Loaded: loaded (/etc/init.d/jenkins; generated)
   Active: active (exited) since Mon 2019-04-08 18:19:15 UTC; 28min ago
     Docs: man:systemd-sysv-generator(8)
    Tasks: 0 (limit: 1152)
   CGroup: /system.slice/jenkins.service

Open Firewall for Jenkins Port

by default jenkins will run on port no 8080. if you are using firewalls in your server allow the firewall for port no 8080.

sudo ufw allow 8080

 

 

Leave a Reply

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