Installing Indivo Server (Tomcat Windows)

From OpenIndivo Documentation Wiki

Jump to: navigation, search

Contents

Ensure the Pre-requisites Exist

Verify Java Development Kit / Java Runtine Environment

From the Windows “Start” button on the menu, select the “Run…” menu item. Into the dialog box, enter the command cmd and press the “Ok” button. This will open a command window with a shell prompt.

Opening a command window
Enlarge
Opening a command window

At the prompt, enter the command

java –version

The following result (or similar) should be displayed:

Confirm the Java development environment is installed
Enlarge
Confirm the Java development environment is installed

If this does not appear, please refer to the Installing And Configuring Java - Windows document and follow the steps to install the Java environment.

Install Tomcat

Download

Tomcat is a widely used open source servlet container. Download [| Tomcat v5.x]. Select the Core download Windows Service Installer.

Install and Configure

Launch the Tomcat installer and click Next when the welcome screen is displayed and accept the license agreement if suitable.

Tomcat welcome screen
Enlarge
Tomcat welcome screen

Since these instructions are not intended for a production system, install the Tomcat components as shown in the next image.

Tomcat installation options
Enlarge
Tomcat installation options

Select the installation directory, in this case, the C:\Tomcat 5.5 directory has been entered. All further instructions will assume this location has been used.

Select the Tomcat install directory
Enlarge
Select the Tomcat install directory

Select the default HTTP servlet port of 8080 and accept the default username with no password. Never deploy production data using these default values for username and password. This example is only suitable for demonstration purposes.

Configure the port and user access
Enlarge
Configure the port and user access

The next screen will confirm the location of the Java Runtime Environment (JRE) found on your system. This value should already be filled in. If this field is blank and you know the location of the JRE on your system, you can enter the value. If not, please return to the step of installing the Java Development Environment as stated in the pre-requisites section above. Do not continue the installation without a correct value in this field.

Confirm the location of the JRE to be used by Tomcat
Enlarge
Confirm the location of the JRE to be used by Tomcat

Once the installation is complete, the confirmation screen will be displayed. Select the option to run the Apache Tomcat.


Tomcat installation complete
Enlarge
Tomcat installation complete


Verify

When running, Tomcat will display an icon in the Windows tray showing a green arrow. Confirm that the tray icon is displayed and that the arrow is green and not red.

Tomcat icon displayed in the Windows system tray
Enlarge
Tomcat icon displayed in the Windows system tray

If the tray icon is not there, select the “Monitor Tomcat” menu option.

Manually start the Tomcat system tray icon
Enlarge
Manually start the Tomcat system tray icon

If the tray icon appears, but the arrow is red, Tomcat is not yet running. Right-click on the icon to display the popup context menu and select “Start service”.

Manually start the Tomcat server
Enlarge
Manually start the Tomcat server

Review the Tomcat log files by navigating to the C:\Tomcat 5.5\logs directory. Since this is the first time Tomcat has started, the stderr_yyyymmdd.log and stdout_yyyymmdd.log should be empty and the catalina.yyyy-mm-dd.log should be minimal. Open the Catalina log and ensure there are no error messages in the log. Catalina is the release name for this version of Tomcat, and any reference to Catalina is equivalent to a reference to Tomcat. Any errors found in this log file should be posted to the Indivo user groups for resolution.

Tomcat log file review
Enlarge
Tomcat log file review

Next, verify the Tomcat server is able to serve pages. Open a browser and enter http://localhost:8080/

Verify the Tomcat validation page appears with the phrase "If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations!". If not, review the logs.

Tomcat correctly installed browser confirmation
Enlarge
Tomcat correctly installed browser confirmation

Install The Indivo Server

Ensure that the Tomcat server has been successfully installed before starting this step.

Download or Build

Download the binaries or build them from source as described on the installation page.

Install and Configure

From within the "demo" subdirectory of the extracted server fileset, find the war file. The .war file is a standardized Web Application Archive format that can be automatically deployed by a standards compliant servlet container such as Tomcat.

Copy this file to the C:\Tomcat 5.5\webapps directory. With Tomcat running, the .war file will be automatically extracted to a directory of the same name within the webapps directory and deployed for use.

Deploy of the .war file and creation of application directory
Enlarge
Deploy of the .war file and creation of application directory

The next step will be to configure the server application logging. Indivo uses the Log4J logging system which allows for detailed configuration of diagnostic and error level logging on a site specific basis.

For this deployment, a simple and verbose level of logging will be configured. Create a file named log4j.properties located in the C:\Tomcat 5.5\webapps\indivo-server\WEB-INF\classes directory. (Note that the directory name "indivo-server" may be different depending on the version of our software that you've downloaded/built).

Location of the log4j.properties file
Enlarge
Location of the log4j.properties file

Open this file for editing and enter the following text:

log4j.rootLogger=debug, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 
log4j.appender.stdout.layout.ConversionPattern=%d %-5p %C.%M - %m%n

This simple configuration will echo all log messages into the C:\Tomcat 5.5\logs\stdout_yyyymmdd.log file.

The last configuration step will set the location of the database, referred to in Indivo as the iostore or pingstore.

Stop the Tomcat server by right-clicking on the Tomcat icon in the system tray and selecting “Stop service” from the menu. Start the Tomcat server by right-clicking on the Tomcat icon in the system tray and selecting "Start service" from the menu.

Verify

First, review the Tomcat logs in the c:\Tomcat 5.5\logs directory. Open the catalina.yyyy-mmm-dd.log file and ensure there are no error messages.

Reviewing the Catalina log file
Enlarge
Reviewing the Catalina log file

Next, verify the correct operation of the server. The web based Indivo front end has not yet been installed, but it is possible to test the Indivo server without the GUI.

With Tomcat running, enter the following URL into a browser (Note that the path "indivo-server" may be different depending on the version of our software):

http://localhost:8080/indivo-server/IndivoServlet

The following text is displayed in response within the browser:

I don't respond to GET!
Indivo server response
Enlarge
Indivo server response

In addition to the browser response, return to the Tomcat logs directory and review the stdout_yyyymmdd.log file. This file will contain extensive log messages regarding the operation of the Indivo server.

Tomcat stdout log
Enlarge
Tomcat stdout log

Reviewing the content of this log file shows a number of debug and info level log messages that indicate that both logging and the iostore were correctly configured and well as the responders. In the event your log file indicates errors, post a message to the users mailing list for resolution.

Personal tools