Issues when configuring Jenkins in Ubuntu

Image for post
Image for post

Prerequisites

Installing Jenkins

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'
sudo apt update
sudo apt install jenkins
sudo systemctl start jenkins
ERROR: No Java executable found in current PATH: /bin:/usr/bin:/sbin:/usr/sbin

Steps to follow

sudo vi /etc/profile
export JAVA_HOME="/home/ubuntu/jdk1.8.0_144/bin
source /etc/profile
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/home/ubuntu/jdk1.8.0_144/bin

Written by

Senior Software Engineer — QA at WSO2

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store