Child pages
  • Install WAR on Tomcat (old)
Skip to end of metadata
Go to start of metadata

The eHour WAR distribution is intended for deployment into an existing Tomcat application server.

1. Install Java

The Java runtime environment is not bundled with eHour. When Java is not installed, download and install the latest JRE from Oracle's site

2. Download eHour

If you haven't done so already, download the WAR distribution of eHour from http://ehour.nl/download/download.phtml

Extract it and remember the path, the location where you unpacked the zip file is the eHour home directory

2. Apache Tomcat installation

Apache Tomcat is the container server which hosts the application. If you don't have Apache Tomcat installed, download it from http://tomcat.apache.org/download-70.cgi and follow their instructions.

3. Install the database

MySQL instructions

(warning) Skip this step when you're performing an upgrade.

Follow the MySQL installation guide (LinuxSetup MySQL on Windows) to install and setup your database.

 

PostgreSQL

(warning) Skip this step when you're performing an upgrade.

Follow the PostgreSQL install guide to install and setup your database.

4. Configure Apache Tomcat

Before you deploy eHour in Tomcat you have to configure the database connection (make sure that Tomcat isn't running).

The tomcat directory contains two directories, tomcat6 for Tomcat 6 and tomcat7 for Tomcat 7. Change to the appropiate directory where  there is a  ehour_mysql.xml and ehour_postgresql.xml config file. In a text editor, open the file that matches your database and replace the following:

Windows

On Windows, use forward slashes in the path. For example, rather than c:\ehour type c:/ehour

 

4.1.Set the location of the web archive

The first line contains:

<Context path="/ehour" reloadable="false" cookies="true" docBase="/opt/ehour/app/ehour-1.x.war">

Replace the path /opt/ehour/app/ehour-1.x.war with the path to your WAR file. It's in the eHour Home directory's app folder.

4.2.Set the location of the eHour Home directory

The second line reads:

<Parameter name="EHOUR_HOME" value="/opt/ehour" override="true" />

Replace /opt/ehour with the path to the eHour Home directory

4.3.Have Tomcat connect to your database

Replace the following fields:

Original valueReplace with

%ehour.db.username%

the database username

%ehour.db.password%

the database password

%ehour.db.hostname%

the hostname/IP address of your database server

%ehour.db.name%the eHour database name


When you're done editing save this file as ehour.xml in the conf/Catalina/localhost directory in your Tomcat install directory. You need to create this directory if you haven't started Tomcat before.

Don't drop the ehour war in Tomcat's webapp directory as you would do with other applications

Make sure you rename the file to ehour.xml


5. Start Apache Tomcat

Make sure you have started your database first.

Start Tomcat by running startup.sh in the bin directory of the Tomcat installation directory. After a couple of seconds Tomcat and eHour will be initialized and you can access the application at http://localhost:8080/ehour

 

  • No labels