sudo apt-get install openjdk-8-jdk
sudo apt-get install maven
sudo apt-get install mysql-server mysql-client
sudo apt-get install tomcat8 tomcat8-admin
sudo vim /etc/tomcat8/tomcat-users.xml
Add manager-gui role to tomcat user.
Edit /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security:
Change:
securerandom.source=file:/dev/random
to:
securerandom.source=file:/dev/./urandom
Restart Apache Tomcat service:
sudo service tomcat8 stop
sudo service tomcat8 start
Add rule to the Google Cloud firewall to port 8080 (http).
Add permission to user to access the database:
CREATE DATABASE <database>;
GRANT ALL PRIVILEGES ON <database>.* TO '<database>'@'localhost' IDENTIFIED BY '<password>';
FLUSH PRIVILEGES;