Home‎ > ‎Server‎ > ‎Tomcat‎ > ‎

Tomcat War Deployment

Deploying wars with Tomcat Manager. Setup the Tomcat7 here.

Deployment

The tomcat manager is my favorite way for deploying apps. 

Setup

Install the manager.
sudo apt-get install tomcat7-manager

Setup Manager User

<!-- Located: /etc/tomcat7/tomcat-users.xml -->
 
<role rolename="admin-gui"/>
 
<role rolename="admin-script"/>
 
<role rolename="manager-script"/>
 
<role rolename="manager-gui"/>
 
<role rolename="manager-script"/>
 
<role rolename="manager-jmx"/>
 
<role rolename="manager-status"/>
 
<user username="branflake" password="Change" roles="admin-gui,admin-script,manager-gui,manager-script,manager-jmx,manager-status"/>

Using the Manager

The Manager

I like using the manager to deploy and manage my applications.  
  • Name the root application ROOT.war
  • The ROOT application that comes setup may need to be deleted with super user permissions in terminal before a new root can be deployed. And can be deleted by sudo rm /var/lib/tomcat7/webapps/ROOT
Goto to the manager by going to host/manager
  • virtual_host_name.domain.tld/manager


Upload War

Choose upload war and choose your war file. If its larger than 50MB the manager web.xml file max size has to be adjusted. 


Adjust Upload for > 50MB Wars

Goto the manager web.xml and adjust the max file size to upload larger wars. 
      <!-- Located: /usr/share/tomcat7-admin/manager/WEB-INF/web.xml -->
      <multipart-config>
        <!-- 1000MB max -->
        <max-file-size>1048576000</max-file-size>
        <max-request-size>1048576000</max-request-size>
        <file-size-threshold>0</file-size-threshold>
      </multipart-config>




Comments