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:
- 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:
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
- After
untar
, let's set up theJAVA_HOME
andPATH
environment variables, as follows:
$ JAVA_HOME=/home/ec2-user/jdk1.8.0_131 $ PATH=/home/ec2-user/jdk1.8.0_131/bin:$PATH $ export JAVA_HOME PATH
Let's check the Java version, using the following command:
- As you can see, we have set up Java 8 in the EC2 instance. Let's run a microservice on this EC2 instance.
Execute the following...