This guide is tailored specifically for users of our Private JVM tool, applicable to all cPanel Private JVM Linux accounts. Access your Private JVM tool directly through your cPanel control panel, located under its designated section.
Step 1: Installing Your Tomcat Instance
To set up your private JVM Tomcat instance, begin by installing Apache Tomcat. Navigate to the Private JVM tool area and use the left-hand drop-down menu to select your Apache Tomcat version from the corresponding right-hand drop-down menu. Once selected, click the “Install” button to deploy the Tomcat instance within your home directory.
Important: Ensure that you verify your Java application’s requirements concerning the JDK and Tomcat versions. Using incorrect versions can lead to numerous issues and potentially prevent your application from starting.
Step 2: Domain Mappings
Before Tomcat can manage your JSP pages and Java applications, you’ll need to specify the domain names to be processed by the Tomcat application service. Select the desired domain name from the “Map a domain to private JVM” drop-down box. This action will create a domain entry in the server.xml file and deploy a default application WAR. Each domain you manage will have a docBase directory, located at:
/home/username/jvm/apache-tomcat-xx/domains/
Step 3: Deploying Your Application
There are various methods to deploy your Java application, with the most straightforward being the deployment of a WAR file. Please note that this option is not available for our Shared JVM packages.
Important: If you wish for your application to be accessible at http://domain.name, rename your WAR file to ROOT.war before deployment. Using any other file name will make your application accessible at http://domain.name/filename.
I. Deploying via WAR
Through Private JVM Tool: Navigate to “Mapped Domains” within the Private JVM tool, select “Upload WAR,” and follow the instructions.
Via Tomcat Management Applications: Use Tomcat Manager or Psi Probe to deploy your WAR file.
Using FTP: Access the “Mapped Domains” section to locate your specific path, such as /home/your username/JVM/apache-tomcat-x.x.xx/domains/your domain.name/, and upload the WAR file to this directory.
II. Deploying Application Files
Upload all necessary files via FTP to the path specified in “Mapped Domains.” The typical path structure is:
/home/your username/JVM/apache-tomcat-x.x.xx/domains/your domain.name/
Step 4: Starting Your Server
Once your application has been uploaded, you’re ready to launch the application server. Simply press the “Start” button within your Private JVM tool.
Note: If your domain name has not yet been pointed to our service, you can test your site using the following method: Click the “Preview” link in the “Mapped Domains” section to access our preview tool. Choose the domain and click the button to proceed.
By following these steps, you can efficiently set up and manage your private JVM on a Linux cPanel environment. This guide ensures your Java applications run smoothly and are easily accessible.