Setting Up Jenkins on Ubuntu Server From Scratch

  Java, Jenkins, Maven, Nexus

Installing Java 8 JDK

The “webupd8team” provides a convenient repository which you can use to install Java 8 JDK on Ubuntu. If you are not afraid of using a potentially unsafe source, you can save quite some time by using this repo. If you have an issue with that, please refer to https://wiki.ubuntuusers.de/Java/Installation/Oracle_Java/Java_8/ and skip this page.

Let us continue with webupd8team’s personal package archive. First, you need to add webupd8team Java PPA (“Personal Packages Archiv”) repository to your repository lookup list:

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update

Then you can install Oracle Java 8 JDK using the following command:

$ sudo apt-get install oracle-java8-installer

After successfully installing Oracle Java using above step verify the installed version using the following command:

$ java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

There is a package in webupd8team’s repository that automatically sets the Java 8 environment variables and sets JDK8 as the default JDK. To install it, use the following command:

$ sudo apt-get install oracle-java8-set-default

Don’t forget to start a new shell in order to see the new environment variables.

LEAVE A COMMENT