Running microservices on AWS EC2

In this section, we will set up account and customer microservices on the EC2 instance. We are using Spring Boot 2.0 in this example:

  1. We have to install Java 8 as well our EC2 instance using the following command:
wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie

You can also refer to the following link:

http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz

The preceding command will download a jdk-8u131-linux-x64.tar.gz file. We extract this file using the following command:

$ sudo tar -xvf jdk-8u131-linux-x64.tar.gz
  1. After untar, let's set up the JAVA_HOME and PATH environment variables, as follows:
$ JAVA_HOME=/home/ec2-user/jdk1.8.0_131 ...

Get Mastering Spring Boot 2.0 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.