Continuing this Ubuntu CI Server series, we will install git and oracle java8.
This will be a quick one!
- Create an ubuntu server installation usb flash drive
- Install ubuntu server
- Install git and oracle java8 on Ubuntu Server
Install git
Connect to the ubuntu server via ssh, we’ve covered how to do this here.
At the command prompt ($) type:
$ sudo apt-get install git
// You may have to accept (press Y) the installation of new packages.

The setup git global settings:
$ git config –global user.name “userver”
$ git config –global user.email “[your-email-address-goes-here]”
Install oracle java8
Ubuntu Server comes with a version of the OpenJDK Runtime Environment (JRE), but for our purposes we want to install the Java Development Kit (JDK) for compiling java code. We will install Oracle’s Java8 JDK (and as a result this will update the JRE too).

As you can see in the image above, oracle java8 is not an available option. That is the repository where oracle java8lies in is not available as standard to Ubuntu Server, so lets add it:
// Lets add the new repository (You may have to press enter to accept a message)
$ sudo add-apt-repository ppa:webupd8team/java
// Refresh the list of packages in the repositories
$ sudo apt-get update
// Install oracle java8
$ sudo apt-get install oracle-java8-installer

Here you will have to accept the license to continue installation


We can now check the currently installed version of the JRE and JDK as we did before:

An extra recommended step is to install the oracle-java8-set-default to set the environment variables for java on the system:
$ sudo apt-get install oracle-java8-set-default

Install java reference: http://tecadmin.net/install-oracle-java-8-jdk-8-ubuntu-via-ppa/
Installing ant and required external library dependencies
To install ant in ubuntu, simply:
$ sudo apt-get install ant
Depending on what you are doing with your ant scripts you might need to copy extra libraries.
The FTP ant task, requires the following library: commons-net.jar
I’ve also copied javax.mail.jar I think because of mail tasks that I run.
I’ve downloaded commons-net-3.4.jar and javax.mail-1.5.5.jar and copied them to
/usr/share/ant/lib/
Leave owner as root
(All other libs are in this dir as symbolic links…)
![]()
- Create an ubuntu server installation usb flash drive
- Install ubuntu server
- Install git and oracle java8 on Ubuntu Server
