Skip to content
Mihir Kakrambe edited this page May 12, 2016 · 35 revisions

Welcome to the PacketAnalyzer wiki!

This page serves as a landing page for the wiki and provides information about how to build and deploy the application. For more information about the components of this application, please check other wiki pages.

Build

This is a Maven application and hence can be built with maven.

Command line

From the root directory of the application (where pom.xml file is present) type the following command in your terminal -

mvn package

For the very first time, it can take a few minutes where it has to download the transitive cover of the dependencies mentioned in pom.xml file.

You can even make a clean build in subsequent times by following command -

mvn clean package

Make sure you have Maven-clean plugin installed.

IDE Plugins

If you are using any IDE like Eclipse then make sure you have the Maven Plugin installed (e.g. Eclipse-Maven-Plugin).

Deploy

Installation

Tomcat7 is used as a container for loading servlets for this application. To install tomcat7 via Apt package manager run the following command in your terminal -

sudo apt-get install tomcat7 tomcat7-admin tomcat7-common

This will install tomcat7 as a service which can be started with -

sudo service tomcat7 start

Pre-Deployment Steps

Before you can deploy the war file for this application on Tomcat, you have to configure Tomcat correctly. To do so please follow the guide below.

Directory Structure

  • CATALINA_HOME - By default, this environmental variable will be set to point to the /usr/share/tomcat7/ directory. This directory contains the bin folder among other folders which holds all the tomcat related scripts, most important of which is catalina.sh script. This scripts starts Tomcat and runs applications within it.

  • CATALINA_BASE - Although there is no default value for this environmental variable, it should point to the directory which contains folders like conf, webapps, logs, server etc. If you have installed Tomcat via apt-get then you can find these folders in ```/var/lib/tomcat7 directory.

Roles and User Credentials

To access manager webapp through browser or deploy applications with command line tools, one has to define appropriate manager-roles in the tomcat-users.xml file present in $CATALINA_BASE/conf/ directory. Some example roles and user credentials are mentioned below -

Clone this wiki locally