{"id":10084,"date":"2017-01-18T06:22:52","date_gmt":"2017-01-18T06:22:52","guid":{"rendered":"http:\/\/mobisoftinfotech.com\/resources\/?p=10084"},"modified":"2025-10-06T14:43:26","modified_gmt":"2025-10-06T09:13:26","slug":"set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk","status":"publish","type":"post","link":"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk","title":{"rendered":"How To Set Up Apache Tomcat Based JEE Server Using Ubuntu 16.04 On EC2 With Either Open JDK Or Oracle JDK"},"content":{"rendered":"<p>In this tutorial, we will learn how to create an EC2 server on the AWS Cloud and setup Java and Tomcat on that server.<\/p>\n<p>Please note that in this tutorial, we are going to do some basic server setup (which is already been explained over last published tutorial, please read <a href=\"https:\/\/mobisoftinfotech.com\/resources\/mguide\/launch-aws-ec2-server-set-ubuntu-16-04\">How To Launch An AWS EC2 Server And Set Up Ubuntu 16.04 On It <\/a>).<\/p>\n<p>Firstly, we would be creating a server by logging into an EC2 account.<\/p>\n<p>We need to go to the EC2 dashboard to launch instance. Now, we are going to do step by step of basic server setup:<\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10086\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/EC2-dashboard-to-launch-instance-mobisoft-infotech.png\" alt=\"EC2 dashboard to launch instance mobisoft infotech\" width=\"745\" height=\"425\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/EC2-dashboard-to-launch-instance-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/EC2-dashboard-to-launch-instance-mobisoft-infotech-300x171.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10086 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20425%22%3E%3C%2Fsvg%3E\" alt=\"EC2 dashboard to launch instance mobisoft infotech\" width=\"745\" height=\"425\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20425%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/EC2-dashboard-to-launch-instance-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/EC2-dashboard-to-launch-instance-mobisoft-infotech-300x171.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/EC2-dashboard-to-launch-instance-mobisoft-infotech.png\"><\/p>\n<p><strong>Step 1:<\/strong> Select Ubuntu 16.04 (64 bit) on your EC2 dashboard;<\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10087\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/select-ubuntu-64-bit-mobisoft-infotech.png\" alt=\"select ubuntu 64 bit mobisoft infotech\" width=\"745\" height=\"421\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/select-ubuntu-64-bit-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/select-ubuntu-64-bit-mobisoft-infotech-300x170.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10087 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20421%22%3E%3C%2Fsvg%3E\" alt=\"select ubuntu 64 bit mobisoft infotech\" width=\"745\" height=\"421\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20421%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/select-ubuntu-64-bit-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/select-ubuntu-64-bit-mobisoft-infotech-300x170.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/select-ubuntu-64-bit-mobisoft-infotech.png\"><\/p>\n<p><strong>Step 2:<\/strong> Use t2.small as Java generally requires more RAM;<\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10088\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/select-an-instance-type-mobisoft-infotech.png\" alt=\"select an instance type mobisoft infotech\" width=\"745\" height=\"413\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/select-an-instance-type-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/select-an-instance-type-mobisoft-infotech-300x166.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10088 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20413%22%3E%3C%2Fsvg%3E\" alt=\"select an instance type mobisoft infotech\" width=\"745\" height=\"413\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20413%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/select-an-instance-type-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/select-an-instance-type-mobisoft-infotech-300x166.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/select-an-instance-type-mobisoft-infotech.png\"><\/p>\n<p><strong>Step 3:<\/strong> Enable Protection against accidental termination, other than that, keep other settings as it is;<\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10089\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/configure-instance-details-mobisoft-infotech.png\" alt=\"configure instance details mobisoft infotech\" width=\"745\" height=\"419\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/configure-instance-details-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/configure-instance-details-mobisoft-infotech-300x169.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10089 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20419%22%3E%3C%2Fsvg%3E\" alt=\"configure instance details mobisoft infotech\" width=\"745\" height=\"419\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20419%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/configure-instance-details-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/configure-instance-details-mobisoft-infotech-300x169.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/configure-instance-details-mobisoft-infotech.png\"><\/p>\n<p><strong>Step 4:<\/strong> For storage, use 25 GB, General purpose SSD;<\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10090\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/add-storage-mobisoft-infotech.png\" alt=\"add-storage-mobisoft-infotech\" width=\"745\" height=\"423\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/add-storage-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/add-storage-mobisoft-infotech-300x170.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10090 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20423%22%3E%3C%2Fsvg%3E\" alt=\"add-storage-mobisoft-infotech\" width=\"745\" height=\"423\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20423%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/add-storage-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/add-storage-mobisoft-infotech-300x170.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/add-storage-mobisoft-infotech.png\"><\/p>\n<p><strong>Step 5:<\/strong> Tag Instance: Enter value as \u201cJavasetup\u201d<\/p>\n<p><strong>Step 6:<\/strong> Configure Security Group, In this, you can either use\/select the existing security group or can create a new security group. We will create a new one and will give it a name and a description:<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>Security Group Name: JavaSetup<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>Description: Security Group created for Java setup<\/ul>\n<\/li>\n<\/ul>\n<p>Type: SSH<br>\nProtocol: TCP<br>\nPort range: 22 (for now)<br>\nSource: Anywhere<\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10091\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Configure-Security-Group-mobisoft-infotech.png\" alt=\"configure security group mobisoft infotech\" width=\"745\" height=\"419\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Configure-Security-Group-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Configure-Security-Group-mobisoft-infotech-300x169.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10091 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20419%22%3E%3C%2Fsvg%3E\" alt=\"configure security group mobisoft infotech\" width=\"745\" height=\"419\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20419%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Configure-Security-Group-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Configure-Security-Group-mobisoft-infotech-300x169.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Configure-Security-Group-mobisoft-infotech.png\"><\/p>\n<p><strong>Step 7:<\/strong> Review Instance Launch and if it looks fine then proceed.<\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10092\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/review-instance-launch-mobisoft-infotech.png\" alt=\"review instance launch mobisoft infotech\" width=\"745\" height=\"419\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/review-instance-launch-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/review-instance-launch-mobisoft-infotech-300x169.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10092 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20419%22%3E%3C%2Fsvg%3E\" alt=\"review instance launch mobisoft infotech\" width=\"745\" height=\"419\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20419%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/review-instance-launch-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/review-instance-launch-mobisoft-infotech-300x169.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/review-instance-launch-mobisoft-infotech.png\"><\/p>\n<p>Now, select \u2018Launch\u2019. When you do that, a dialog box would pop up giving you an option of selecting an existing key pair or creating a new key pair.<\/p>\n<p>Here, we are going to use an existing key pair. It&#8217;s OK, if you might want to create a new set of key pair.<\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10093\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Select-a-key-pair-mobisoft-infotech.png\" alt=\"select a key pair mobisoft infotech\" width=\"745\" height=\"422\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Select-a-key-pair-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Select-a-key-pair-mobisoft-infotech-300x170.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10093 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20422%22%3E%3C%2Fsvg%3E\" alt=\"select a key pair mobisoft infotech\" width=\"745\" height=\"422\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20422%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Select-a-key-pair-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Select-a-key-pair-mobisoft-infotech-300x170.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Select-a-key-pair-mobisoft-infotech.png\"><\/p>\n<p>For this instance, we require Elastic IP address. So, while it launches I will provision for it.<\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10094\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Launch-Instance-mobisoft-infotech.png\" alt=\"launch instance mobisoft infotech\" width=\"745\" height=\"415\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Launch-Instance-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Launch-Instance-mobisoft-infotech-300x167.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10094 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20415%22%3E%3C%2Fsvg%3E\" alt=\"launch instance mobisoft infotech\" width=\"745\" height=\"415\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20415%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Launch-Instance-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Launch-Instance-mobisoft-infotech-300x167.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Launch-Instance-mobisoft-infotech.png\"><\/p>\n<p>Check if your instance is working. Now, you need to associate the Elastic IP with our Java setup server.<\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10095\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/allocate-address-mobisoft-infotech.png\" alt=\"allocate address mobisoft infotech\" width=\"745\" height=\"424\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/allocate-address-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/allocate-address-mobisoft-infotech-300x171.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10095 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20424%22%3E%3C%2Fsvg%3E\" alt=\"allocate address mobisoft infotech\" width=\"745\" height=\"424\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20424%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/allocate-address-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/allocate-address-mobisoft-infotech-300x171.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/allocate-address-mobisoft-infotech.png\"><\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10096\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Associate-the-address-mobisoft-infotech.png\" alt=\"associate the address mobisoft infotech\" width=\"745\" height=\"424\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Associate-the-address-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Associate-the-address-mobisoft-infotech-300x171.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10096 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20424%22%3E%3C%2Fsvg%3E\" alt=\"associate the address mobisoft infotech\" width=\"745\" height=\"424\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20424%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Associate-the-address-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Associate-the-address-mobisoft-infotech-300x171.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Associate-the-address-mobisoft-infotech.png\"><\/p>\n<p>Go to &gt;&gt;<\/p>\n<p>Instances&gt;Elastic IP Address<\/p>\n<p>Now, review if Elastic IP Address is present.<\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10098\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Elastic-Ip-address-check-mobisoft-infotech.png\" alt=\"elastic ip address check mobisoft infotech\" width=\"745\" height=\"424\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Elastic-Ip-address-check-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Elastic-Ip-address-check-mobisoft-infotech-300x171.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10098 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20424%22%3E%3C%2Fsvg%3E\" alt=\"elastic ip address check mobisoft infotech\" width=\"745\" height=\"424\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20424%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Elastic-Ip-address-check-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Elastic-Ip-address-check-mobisoft-infotech-300x171.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Elastic-Ip-address-check-mobisoft-infotech.png\"><\/p>\n<p>Now, I used to do the SSH login to the server.<\/p>\n<p>Post that, we will run through the basic server setup. (You can refer to the previous tutorial on <a href=\"https:\/\/mobisoftinfotech.com\/resources\/mguide\/launch-aws-ec2-server-set-ubuntu-16-04\" target=\"_blank\" rel=\"noopener noreferrer\">basic server setup<\/a>)<\/p>\n<p>We\u2019ll have to wait for a couple of minutes then it will restart. When the system is back on, proceed through the further process of setting up of the JDKs and the Tomcat servers:<\/p>\n<p>From now on, our preferred JDK would be Open JDK because most of the beanstalk installation as well as Heroku prefers Open JDK. Therefore, we need to add an apt-get source from where JDK is installed.<\/p>\n<p><strong>To add apt-get source, please run this command:<\/strong><\/p>\n<pre style=\"background-color: #f3f3f7;\">$ sudo -E add-apt-repository ppa:openjdk-r\/ppa<\/pre>\n<p>When the source is added, update by running this command:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$ sudo apt-get update<\/pre>\n<p>We\u2019ll learn, now, how to install multiple versions of JDKs and how to switch between them. The first one is Open JDK 7, for its setup run this command:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$ sudo apt-get install openjdk-7-jdk<\/pre>\n<p>Now, how to check if the above setup is done or not?<\/p>\n<p>Run this command on the directory:<\/p>\n<p>&gt;&gt;<\/p>\n<pre style=\"background-color: #f3f3f7;\">$java -version<\/pre>\n<p>When you run this command, you\u2019ll get this as a result:<\/p>\n<pre style=\"background-color: #f3f3f7;\">#-&gt; java version \"1.7.0_95\"\n#-&gt; OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-3)\n#-&gt; OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)<\/pre>\n<p>Similarly, now we want to check JavaC version. For that, we need to run this command:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$javac -version<\/pre>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10099\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/JavaC-version-mobisoft-infotech.png\" alt=\"javac version mobisoft infotech\" width=\"745\" height=\"415\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/JavaC-version-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/JavaC-version-mobisoft-infotech-300x167.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10099 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20415%22%3E%3C%2Fsvg%3E\" alt=\"javac version mobisoft infotech\" width=\"745\" height=\"415\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20415%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/JavaC-version-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/JavaC-version-mobisoft-infotech-300x167.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/JavaC-version-mobisoft-infotech.png\"><\/p>\n<p>It\u2019s again 1.7.0_95<\/p>\n<p>Following the same process, we would now install Open JDK 8 and run this command:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$sudo apt-get install openjdk-8-jdk<\/pre>\n<p>After this, we will check the Java version:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$java -version<\/pre>\n<p>When you run this command, you\u2019ll get this as a <strong>result<\/strong>:<\/p>\n<pre style=\"background-color: #f3f3f7;\"># openjdk version \"1.8.0_91\"\n# OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-3ubuntu1~16.04.1-b14)\n# OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)<\/pre>\n<p>Now, we will check Javac version and run this command:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$javac -version<\/pre>\n<p>It\u2019s also 1.8.0_91<\/p>\n<p># javac 1.8.0_91<\/p>\n<p>Now, let\u2019s try to switch back to JDK-7 for that command is:<\/p>\n<p>$update-java-alternatives &#8211;list<\/p>\n<p>This shows which JDKs are installed and what\u2019s the value of JAVA_HOME for each of those.<\/p>\n<p>We would now want to <strong>switch to<\/strong> this:<\/p>\n<pre style=\"background-color: #f3f3f7;\">java-1.7.0-openjdk-amd64<\/pre>\n<p>So, we will do that by running this command:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$sudo update-java-alternatives --set java-1.7.0-openjdk-amd64<\/pre>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10102\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/no-alternatives-for-mozilla-plugins-mobisoft-infotech.png\" alt=\"no alternatives for mozilla plugins mobisoft infotech\" width=\"745\" height=\"421\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/no-alternatives-for-mozilla-plugins-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/no-alternatives-for-mozilla-plugins-mobisoft-infotech-300x170.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10102 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20421%22%3E%3C%2Fsvg%3E\" alt=\"no alternatives for mozilla plugins mobisoft infotech\" width=\"745\" height=\"421\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20421%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/no-alternatives-for-mozilla-plugins-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/no-alternatives-for-mozilla-plugins-mobisoft-infotech-300x170.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/no-alternatives-for-mozilla-plugins-mobisoft-infotech.png\"><\/p>\n<p>Unfortunately, <strong>it fails because there\u2019s some problem with Mozilla-javaplugin<\/strong>.<\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10100\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/there-is-some-problem-with-mozilla-plugins-mobisoft-infotech.png\" alt=\"there is some problem with mozilla plugins mobisoft infotech\" width=\"745\" height=\"413\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/there-is-some-problem-with-mozilla-plugins-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/there-is-some-problem-with-mozilla-plugins-mobisoft-infotech-300x166.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10100 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20413%22%3E%3C%2Fsvg%3E\" alt=\"there is some problem with mozilla plugins mobisoft infotech\" width=\"745\" height=\"413\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20413%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/there-is-some-problem-with-mozilla-plugins-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/there-is-some-problem-with-mozilla-plugins-mobisoft-infotech-300x166.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/there-is-some-problem-with-mozilla-plugins-mobisoft-infotech.png\"><\/p>\n<p>To fix this issue, we need to install that very plugin and for that we would require a ppa-source. You can add it by running this command:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$sudo add-apt-repository ppa:maarten-fonville\/ppa<\/pre>\n<p>Now, we need to <strong>update the apt-get sources<\/strong> again!<\/p>\n<p>For that, we want to run this command:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$sudo apt-get update<\/pre>\n<p>Now, these are the commands for:<\/p>\n<p># For JDK 7 plugin<\/p>\n<pre>sudo apt-get install icedtea-web<\/pre>\n<p># ForJDK 8 plugin<\/p>\n<pre style=\"background-color: #f3f3f7;\">sudo apt-get install icedtea-8-plugin<\/pre>\n<p>After this, you can check Java version and Javac version. Here, are the required commands and the expected results:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$ java -version\n#-&gt; java version \"1.7.0_95\"\n#-&gt; OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-3)\n#-&gt; OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)\n$ javac -version<\/pre>\n<p>#-&gt; javac 1.7.0_95<\/p>\n<p>Sometimes you need to run &#8220;sudo update-alternatives &#8211;config javac&#8221; to change javac. But right now, it is not needed.<\/p>\n<p>Next, we would now add Oracle\u2019s JDKs. For that, you want to add one ppa, i.e:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$ sudo add-apt-repository ppa:webupd8team\/java<\/pre>\n<p>Now, let\u2019s update the apt-get sources:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$ sudo apt-get update<\/pre>\n<p>Next, we would be installing Oracle Java6, Java7 and Java8 one by one:<\/p>\n<p>Here are the following commands you need to run:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$ sudo apt-get install oracle-java6-installer\n$ sudo apt-get install oracle-java7-installer\n$ sudo apt-get install oracle-java8-installer<\/pre>\n<p>Please note that you would not typically install all of these on the server. You would typically install Open JDK 8. In this tutorial, you\u2019re taught to do so because if you require any specific JDK for your project you would be able to do it.<\/p>\n<p>Now, we will check the update Java alternatives by running this command:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$ update-java-alternatives --list<\/pre>\n<p>You can see that all the JDK versions are now available to use on this system.<\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10120\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/all-java-versions-are-now-available.png\" alt=\"all java versions are now available mobisoft infotech\" width=\"745\" height=\"424\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/all-java-versions-are-now-available.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/all-java-versions-are-now-available-300x171.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10120 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20424%22%3E%3C%2Fsvg%3E\" alt=\"all java versions are now available mobisoft infotech\" width=\"745\" height=\"424\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20424%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/all-java-versions-are-now-available.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/all-java-versions-are-now-available-300x171.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/all-java-versions-are-now-available.png\"><\/p>\n<pre style=\"background-color: #f3f3f7;\">#-&gt; java-1.7.0-openjdk-amd64 1071 \/usr\/lib\/jvm\/java-1.7.0-openjdk-amd64\n#-&gt; java-1.8.0-openjdk-amd64 1081 \/usr\/lib\/jvm\/java-1.8.0-openjdk-amd64\n#-&gt; java-6-oracle 1082 \/usr\/lib\/jvm\/java-6-oracle\n#-&gt; java-7-oracle 1083 \/usr\/lib\/jvm\/java-7-oracle\n#-&gt; java-8-oracle 1084 \/usr\/lib\/jvm\/java-8-oracle<\/pre>\n<p>We would like to use Open JDK 8, so to set that up we need to run this command:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$ sudo update-java-alternatives --set java-1.8.0-openjdk-amd64<\/pre>\n<p>Now, let\u2019s check the java and javac versions. To see, if it is correct we need to run the following commands:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$java -version<\/pre>\n<p>Expected result would be:<\/p>\n<pre style=\"background-color: #f3f3f7;\">#-&gt; openjdk version \"1.8.0_91\"\n#-&gt; OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-3ubuntu1~16.04.1-b14)\n#-&gt; OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)\n$javac -version<\/pre>\n<p>Expected result would be:<\/p>\n<p>#-&gt; javac 1.8.0_101<\/p>\n<p>Both java and javac versions are correct!<\/p>\n<p>We are ready to install Tomcat. I have used this tutorial to install Tomcat<\/p>\n<p>## <a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-install-apache-tomcat-8-on-ubuntu-16-04\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-install-apache-tomcat-8-on-ubuntu-16-04<\/a><\/p>\n<p>I have made some minor changes, for this tutorial, to suit our requirements. Let\u2019s create this directory in our home folder (~ denotes home folder), run the following commands:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$ mkdir ~\/software\n$ cd ~\n$ pwd<\/pre>\n<p>Home folder would be \/home\/ubuntu for this user<\/p>\n<p>Let\u2019s now download the Tomcat using the curl command<\/p>\n<pre>$ curl -O <a href=\"http:\/\/mirror.fibergrid.in\/apache\/tomcat\/tomcat-8\/v8.5.6\/bin\/apache-tomcat-8.5.6.tar.gz\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/mirror.fibergrid.in\/apache\/tomcat\/tomcat-8\/v8.5.6\/bin\/apache-tomcat-8.5.6.tar.gz<\/a><\/pre>\n<p>Please note that you should get the latest download link from this (https:\/\/tomcat.apache.org\/download-80.cgi) page.<\/p>\n<p>Once it is downloaded, let\u2019s go back to the home directory again and <strong>create the opt directory<\/strong> by running the commands one by one:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$ mkdir opt\n$ cd opt<\/pre>\n<p>And then to extract the Tomcat setup run this command:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$ tar xvzf ~\/software\/apache-tomcat-8.5.6.tar.gz -C .<\/pre>\n<p>After this, we will create a symlink so that we can refer to apache-tomcat-8.5.6 with just Tomcat:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$ ln -s ~\/opt\/apache-tomcat-8.5.6\/ tomcat\n$ ls -la<\/pre>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10104\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/symlink-to-refer-to-tomcat-mobisoft-infotech.png\" alt=\"symlink to refer to tomcat mobisoft infotech\" width=\"745\" height=\"418\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/symlink-to-refer-to-tomcat-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/symlink-to-refer-to-tomcat-mobisoft-infotech-300x168.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10104 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20418%22%3E%3C%2Fsvg%3E\" alt=\"symlink to refer to tomcat mobisoft infotech\" width=\"745\" height=\"418\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20418%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/symlink-to-refer-to-tomcat-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/symlink-to-refer-to-tomcat-mobisoft-infotech-300x168.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/symlink-to-refer-to-tomcat-mobisoft-infotech.png\"><\/p>\n<p>Post this, we are going to create the startup script for Tomcat. With Ubuntu 16.04, the way to start script has changed. The preferred way to do it now is via systemd service. Before this, we used to create our script in \/etc\/init.d<\/p>\n<p>This option is still available but as said before, the preferred way to do it is with systemd. Therefore, we would be using the same way of creating a startup script. For this, we basically need to create this file.<\/p>\n<pre style=\"background-color: #f3f3f7;\">$ sudo vi \/etc\/systemd\/system\/tomcat.service<\/pre>\n<p><strong>For this tutorial, I have already created this file. Note that, I have setup the following:<\/strong><\/p>\n<p><em>[Unit]\nDescription=Apache Tomcat Web Application Container<br>\nAfter=network.target<\/em><\/p>\n[Service]\nType=forking\n<p>Environment=JAVA_HOME=\/usr\/lib\/jvm\/java-1.8.0-openjdk-amd64<br>\nEnvironment=CATALINA_PID=\/home\/ubuntu\/opt\/tomcat\/temp\/tomcat.pid<br>\nEnvironment=CATALINA_HOME=\/home\/ubuntu\/opt\/tomcat<br>\nEnvironment=CATALINA_BASE=\/home\/ubuntu\/opt\/tomcat<br>\nEnvironment=&#8217;CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC&#8217;<br>\nEnvironment=&#8217;JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:\/dev\/.\/urandom&#8217;<\/p>\n<p>ExecStart=\/home\/ubuntu\/opt\/tomcat\/bin\/startup.sh<br>\nExecStop=\/home\/ubuntu\/opt\/tomcat\/bin\/shutdown.sh<\/p>\n<p>User=ubuntu<br>\nGroup=ubuntu<br>\nUMask=0007<br>\nRestartSec=10<br>\nRestart=always<\/p>\n<p><em>[Install]\nWantedBy=multi-user.target<\/em><\/p>\n<p>You might need to make some changes on this, on the basis of your project\u2019s requirements.<\/p>\n<p>Now, let\u2019s reload the systemctl daemon by running this command:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$ sudo systemctl daemon-reload<\/pre>\n<p>Here, we can start Tomcat:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$ sudo systemctl start tomcat<\/pre>\n<p>It is up and running. To check, run either<\/p>\n<pre style=\"background-color: #f3f3f7;\">$ ps aux | grep tomcat<\/pre>\n<p>Or via<\/p>\n<pre style=\"background-color: #f3f3f7;\">$ sudo systemctl status tomcat<\/pre>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10106\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/check-if-tomcat-has-started-mobisoft-infotech.png\" alt=\"check if tomcat has started mobisoft infotech\" width=\"745\" height=\"413\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/check-if-tomcat-has-started-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/check-if-tomcat-has-started-mobisoft-infotech-300x166.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10106 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20413%22%3E%3C%2Fsvg%3E\" alt=\"check if tomcat has started mobisoft infotech\" width=\"745\" height=\"413\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20413%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/check-if-tomcat-has-started-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/check-if-tomcat-has-started-mobisoft-infotech-300x166.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/check-if-tomcat-has-started-mobisoft-infotech.png\"><\/p>\n<p>So, now Tomcat has started!<\/p>\n<p>You may now want to check if Tomcat is running and if it is actually accessible but as you know, Tomcat runs on port 8080. So, you would require to open port 8080 in your security group.<\/p>\n<p><strong>Go to &gt;&gt; Security Group &gt; Select the Security Group that you have created for the server &gt; Edit inbound rules &gt; Add a new TCP rule &gt; Enter Port Range as 8080<\/strong><\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10107\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/edit-inbound-rules-mobisoft-infotech.png\" alt=\"edit inbound rules mobisoft infotech\" width=\"745\" height=\"418\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/edit-inbound-rules-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/edit-inbound-rules-mobisoft-infotech-300x168.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10107 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20418%22%3E%3C%2Fsvg%3E\" alt=\"edit inbound rules mobisoft infotech\" width=\"745\" height=\"418\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20418%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/edit-inbound-rules-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/edit-inbound-rules-mobisoft-infotech-300x168.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/edit-inbound-rules-mobisoft-infotech.png\"><\/p>\n<p>Allow it to be connected from \u2018anywhere\u2019 from the internet.<\/p>\n<p>So, now if we go to our Elastic IP Address<\/p>\n<p>Open port 8080 in EC2 security group and check it at: <a href=\"http:\/\/52.54.92.131:8080\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/52.54.92.131:8080\/<\/a><\/p>\n<p>We should see the \u201cTomcat page\u201d.<\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10108\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Tomcat-page-mobisoft-infotech.png\" alt=\"tomcat page mobisoft infotech\" width=\"745\" height=\"421\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Tomcat-page-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Tomcat-page-mobisoft-infotech-300x170.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10108 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20421%22%3E%3C%2Fsvg%3E\" alt=\"tomcat page mobisoft infotech\" width=\"745\" height=\"421\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20421%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Tomcat-page-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Tomcat-page-mobisoft-infotech-300x170.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Tomcat-page-mobisoft-infotech.png\"><\/p>\n<p>And it is there!<\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10109\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Manager-App-mobisoft-infotech.png\" alt=\"manager app mobisoft infotech\" width=\"745\" height=\"418\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Manager-App-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Manager-App-mobisoft-infotech-300x168.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10109 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20418%22%3E%3C%2Fsvg%3E\" alt=\"manager app mobisoft infotech\" width=\"745\" height=\"418\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20418%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Manager-App-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Manager-App-mobisoft-infotech-300x168.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Manager-App-mobisoft-infotech.png\"><\/p>\n<p>The \u201cManager App\u201d should not be present here and should be stopped immediately for the reason that hackers looks for 8080 port and they try to hack this manager app.<\/p>\n<p>Hence, we need to delete it. If it is setup, we will tell you how to delete it and restart Tomcat.<\/p>\n<p>Stop the Tomcat.<\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10110\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Tomcat-has-stopped-mobisoft-infotech.png\" alt=\"tomcat has stopped mobisoft infotech\" width=\"745\" height=\"413\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Tomcat-has-stopped-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Tomcat-has-stopped-mobisoft-infotech-300x166.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10110 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20413%22%3E%3C%2Fsvg%3E\" alt=\"tomcat has stopped mobisoft infotech\" width=\"745\" height=\"413\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20413%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Tomcat-has-stopped-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Tomcat-has-stopped-mobisoft-infotech-300x166.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Tomcat-has-stopped-mobisoft-infotech.png\"><\/p>\n<p>Run these commands to stop Tomcat:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$ sudo systemctl stop tomcat\n$ cd ~\/opt\/tomcat\n$ cd webapps\/\n$ rm -rf manager\/\n$ rm -rf docs\/\n$ rm -rf examples\/\n$ rm -rf host-manager\/\n$ ls<\/pre>\n<p>Now, go back and refresh to check if Tomcat has stopped.<\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10110\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Tomcat-has-stopped-mobisoft-infotech.png\" alt=\"tomcat has stopped mobisoft infotech\" width=\"745\" height=\"413\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Tomcat-has-stopped-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Tomcat-has-stopped-mobisoft-infotech-300x166.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10110 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20413%22%3E%3C%2Fsvg%3E\" alt=\"tomcat has stopped mobisoft infotech\" width=\"745\" height=\"413\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20413%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Tomcat-has-stopped-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Tomcat-has-stopped-mobisoft-infotech-300x166.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Tomcat-has-stopped-mobisoft-infotech.png\"><\/p>\n<p>Once it is stopped, let\u2019s start Tomcat. We need to run this command:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$ sudo systemctl start tomcat<\/pre>\n<p>To check the status:<\/p>\n<pre style=\"background-color: #f3f3f7;\">$sudo systemctl status tomcat<\/pre>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10111\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Its-running-manager-app-removed-mobisoft-infotech.png\" alt=\"its running manager app removed mobisoft infotech\" width=\"745\" height=\"415\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Its-running-manager-app-removed-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Its-running-manager-app-removed-mobisoft-infotech-300x167.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10111 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20415%22%3E%3C%2Fsvg%3E\" alt=\"its running manager app removed mobisoft infotech\" width=\"745\" height=\"415\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20415%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Its-running-manager-app-removed-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Its-running-manager-app-removed-mobisoft-infotech-300x167.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Its-running-manager-app-removed-mobisoft-infotech.png\"><\/p>\n<p><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10112\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Manager-App-has-stopped-error-404-mobisoft-infotech.png\" alt=\"manager app has stopped error 404 mobisoft infotech\" width=\"745\" height=\"418\" srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Manager-App-has-stopped-error-404-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Manager-App-has-stopped-error-404-mobisoft-infotech-300x168.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\"><\/noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-10112 lazyload\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20418%22%3E%3C%2Fsvg%3E\" alt=\"manager app has stopped error 404 mobisoft infotech\" width=\"745\" height=\"418\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20745%20418%22%3E%3C%2Fsvg%3E 745w\" sizes=\"(max-width: 745px) 100vw, 745px\" data-srcset=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Manager-App-has-stopped-error-404-mobisoft-infotech.png 745w, https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Manager-App-has-stopped-error-404-mobisoft-infotech-300x168.png 300w\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/Manager-App-has-stopped-error-404-mobisoft-infotech.png\"><\/p>\n<p>Tomcat is running and Manager app has stopped, you can see it when you go to the browser and check!<\/p>\n<p>This is critically important to remove \u2018Manager App\u2019 so that hackers cannot get into our Tomcat instances. Anyway, we manage everything from the command line so we don\u2019t really need this \u2018Manager\u2019.<\/p>\n<p>So, that&#8217;s it. Our Apache Tomcat Server is ready for use.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we will learn how to create an EC2 server on the AWS Cloud and setup Java and Tomcat on that server. Please note that in this tutorial, we are going to do some basic server setup (which is already been explained over last published tutorial, please read How To Launch An AWS [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":10115,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"yes","footnotes":""},"categories":[450],"tags":[621,620],"class_list":["post-10084","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mguide","tag-aws-cloud","tag-ec2-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How To Set Up Apache Tomcat Based JEE Server Using Ubuntu 16.04 On EC2 With Either Open JDK Or Oracle JDK<\/title>\n<meta name=\"description\" content=\"In this Tutorial, Learn How to Create an EC2 Server on the AWS Cloud and Setup Java and Tomcat on that Server.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Set Up Apache Tomcat Based JEE Server Using Ubuntu 16.04 On EC2 With Either Open JDK Or Oracle JDK\" \/>\n<meta property=\"og:description\" content=\"In this Tutorial, Learn How to Create an EC2 Server on the AWS Cloud and Setup Java and Tomcat on that Server.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk\" \/>\n<meta property=\"og:site_name\" content=\"Mobisoft Infotech\" \/>\n<meta property=\"article:published_time\" content=\"2017-01-18T06:22:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-06T09:13:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/setting-up-apache-tomcat-using-ubuntu-16.0.4-mobisoft-infotech.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"853\" \/>\n\t<meta property=\"og:image:height\" content=\"391\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Pritam Barhate\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pritam Barhate\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk#article\",\"isPartOf\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk\"},\"author\":{\"name\":\"Pritam Barhate\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/fa762036b3364f26abeea146c01487ee\"},\"headline\":\"How To Set Up Apache Tomcat Based JEE Server Using Ubuntu 16.04 On EC2 With Either Open JDK Or Oracle JDK\",\"datePublished\":\"2017-01-18T06:22:52+00:00\",\"dateModified\":\"2025-10-06T09:13:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk\"},\"wordCount\":1577,\"image\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/setting-up-apache-tomcat-using-ubuntu-16.0.4-mobisoft-infotech.jpg\",\"keywords\":[\"AWS Cloud\",\"EC2 Server\"],\"articleSection\":[\"MGuide\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk\",\"name\":\"How To Set Up Apache Tomcat Based JEE Server Using Ubuntu 16.04 On EC2 With Either Open JDK Or Oracle JDK\",\"isPartOf\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk#primaryimage\"},\"image\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/setting-up-apache-tomcat-using-ubuntu-16.0.4-mobisoft-infotech.jpg\",\"datePublished\":\"2017-01-18T06:22:52+00:00\",\"dateModified\":\"2025-10-06T09:13:26+00:00\",\"author\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/fa762036b3364f26abeea146c01487ee\"},\"description\":\"In this Tutorial, Learn How to Create an EC2 Server on the AWS Cloud and Setup Java and Tomcat on that Server.\",\"breadcrumb\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk#primaryimage\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/setting-up-apache-tomcat-using-ubuntu-16.0.4-mobisoft-infotech.jpg\",\"contentUrl\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/setting-up-apache-tomcat-using-ubuntu-16.0.4-mobisoft-infotech.jpg\",\"width\":853,\"height\":391,\"caption\":\"setting up apache tomcat using ubuntu 16 0 4 mobisoft infotech\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/mobisoftinfotech.com\/resources\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Set Up Apache Tomcat Based JEE Server Using Ubuntu 16.04 On EC2 With Either Open JDK Or Oracle JDK\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#website\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/\",\"name\":\"Mobisoft Infotech\",\"description\":\"Discover Mobility\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mobisoftinfotech.com\/resources\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/fa762036b3364f26abeea146c01487ee\",\"name\":\"Pritam Barhate\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/0e481c7ce54b3567ac70ddfc493523eefce0bdc3ee69fd2654f8f60a79e2f178?s=96&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0e481c7ce54b3567ac70ddfc493523eefce0bdc3ee69fd2654f8f60a79e2f178?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0e481c7ce54b3567ac70ddfc493523eefce0bdc3ee69fd2654f8f60a79e2f178?s=96&r=g\",\"caption\":\"Pritam Barhate\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Set Up Apache Tomcat Based JEE Server Using Ubuntu 16.04 On EC2 With Either Open JDK Or Oracle JDK","description":"In this Tutorial, Learn How to Create an EC2 Server on the AWS Cloud and Setup Java and Tomcat on that Server.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk","og_locale":"en_US","og_type":"article","og_title":"How To Set Up Apache Tomcat Based JEE Server Using Ubuntu 16.04 On EC2 With Either Open JDK Or Oracle JDK","og_description":"In this Tutorial, Learn How to Create an EC2 Server on the AWS Cloud and Setup Java and Tomcat on that Server.","og_url":"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk","og_site_name":"Mobisoft Infotech","article_published_time":"2017-01-18T06:22:52+00:00","article_modified_time":"2025-10-06T09:13:26+00:00","og_image":[{"width":853,"height":391,"url":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/setting-up-apache-tomcat-using-ubuntu-16.0.4-mobisoft-infotech.jpg","type":"image\/jpeg"}],"author":"Pritam Barhate","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Pritam Barhate","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk#article","isPartOf":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk"},"author":{"name":"Pritam Barhate","@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/fa762036b3364f26abeea146c01487ee"},"headline":"How To Set Up Apache Tomcat Based JEE Server Using Ubuntu 16.04 On EC2 With Either Open JDK Or Oracle JDK","datePublished":"2017-01-18T06:22:52+00:00","dateModified":"2025-10-06T09:13:26+00:00","mainEntityOfPage":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk"},"wordCount":1577,"image":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk#primaryimage"},"thumbnailUrl":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/setting-up-apache-tomcat-using-ubuntu-16.0.4-mobisoft-infotech.jpg","keywords":["AWS Cloud","EC2 Server"],"articleSection":["MGuide"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk","url":"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk","name":"How To Set Up Apache Tomcat Based JEE Server Using Ubuntu 16.04 On EC2 With Either Open JDK Or Oracle JDK","isPartOf":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk#primaryimage"},"image":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk#primaryimage"},"thumbnailUrl":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/setting-up-apache-tomcat-using-ubuntu-16.0.4-mobisoft-infotech.jpg","datePublished":"2017-01-18T06:22:52+00:00","dateModified":"2025-10-06T09:13:26+00:00","author":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/fa762036b3364f26abeea146c01487ee"},"description":"In this Tutorial, Learn How to Create an EC2 Server on the AWS Cloud and Setup Java and Tomcat on that Server.","breadcrumb":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk#primaryimage","url":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/setting-up-apache-tomcat-using-ubuntu-16.0.4-mobisoft-infotech.jpg","contentUrl":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2017\/01\/setting-up-apache-tomcat-using-ubuntu-16.0.4-mobisoft-infotech.jpg","width":853,"height":391,"caption":"setting up apache tomcat using ubuntu 16 0 4 mobisoft infotech"},{"@type":"BreadcrumbList","@id":"https:\/\/mobisoftinfotech.com\/resources\/mguide\/set-apache-tomcat-based-jee-server-using-ubuntu-16-04-ec2-either-open-jdk-oracle-jdk#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mobisoftinfotech.com\/resources\/"},{"@type":"ListItem","position":2,"name":"How To Set Up Apache Tomcat Based JEE Server Using Ubuntu 16.04 On EC2 With Either Open JDK Or Oracle JDK"}]},{"@type":"WebSite","@id":"https:\/\/mobisoftinfotech.com\/resources\/#website","url":"https:\/\/mobisoftinfotech.com\/resources\/","name":"Mobisoft Infotech","description":"Discover Mobility","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mobisoftinfotech.com\/resources\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/fa762036b3364f26abeea146c01487ee","name":"Pritam Barhate","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0e481c7ce54b3567ac70ddfc493523eefce0bdc3ee69fd2654f8f60a79e2f178?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0e481c7ce54b3567ac70ddfc493523eefce0bdc3ee69fd2654f8f60a79e2f178?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0e481c7ce54b3567ac70ddfc493523eefce0bdc3ee69fd2654f8f60a79e2f178?s=96&r=g","caption":"Pritam Barhate"}}]}},"_links":{"self":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/10084","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/comments?post=10084"}],"version-history":[{"count":16,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/10084\/revisions"}],"predecessor-version":[{"id":43639,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/10084\/revisions\/43639"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/media\/10115"}],"wp:attachment":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/media?parent=10084"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/categories?post=10084"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/tags?post=10084"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}