Build a Java Prod environment on Ubuntu

If you need to setup a java test or production environment, We have prepared a bootstrap document for you. We will setup Java8, Tomcat server, MySQL database and nginx as reverse proxy. This document is handy to setup a new environment on cloud services like AWS or Digital Ocean.

Following setup is prepared on Ubuntu 14.


Nginx is one of the most popular web servers. You can use it as a web serve or reverse proxy. We will use it as reverse proxy in front of tomcat. You can setup nginx from  this document.


Java8 setup is easy. Run following commands and you are done. Here is the reference document.


You can use this  document to setup mysql. Follow all instructions for safe installation. There are important steps for security, make sure that you run security script.

Tomcat 8

You can follow this document  for tomcat. When you get installation package, make sure that you get latest from tomcat offical page. Don’t forget to complete user instruction at the end of the document. You need to put your war into /webapps directory of tomcat. You need to give write access to this directory.

If you need to pass environment varaibles like spring profile, you need to pass this information with file under /bin directory of tomcat. If you don’t have this file, create yourself. Here is a sample config.


Leave a Reply

Your email address will not be published. Required fields are marked *