Installing the GlassFish 5 Server

At the time of writing this chapter, the Linux instance that's been created by AWS is preinstalled with JDK 7. However, we have been using JDK 8 in this book. Therefore, we will start by uninstalling JDK 7 and installing JDK 8. Open a shell in the instance from Eclipse (see the previous sections for details) and run the following commands:

Commands

Description

sudo yum remove java-1.7.0-openjdk -y

Removes JDK 7 from the instance.

sudo yum install java-1.8.0 -y

Installs JDK 8.

wget http://download.oracle.com/glassfish/5.0/release/glassfish-5.0.zip

Downloads GlassFish 5.

unzip glassfish-5.0.zip

Unzips the downloaded GlassFish 5 ZIP file.

glassfish5/glassfish/bin/asadmin --host ...

Get Java EE 8 Development with Eclipse now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.