Child pages
  • Install WAR on Tomcat

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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-80.cgi and follow their instructions. Apache Tomcat 7 is the minium required version.

3.

...

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

MySQL instructions

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

 

PostgreSQL

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

...

Configure Apache Tomcat

Set the location of your eHour Home directory by creating an environment variable EHOUR_HOME with the absolute path of the eHour directory.

...

Info
titleLinux

Locate the bin directory in your Tomcat's install directory. Among other files it contains catalina.sh and startup.sh. In this directory create or edit the file setenv.sh. Make sure that it's executable with 

	chmod +x setenv.sh

 

Add the following line to setenv.sh. Change /opt/ehour to point to the eHour Home directory:

	export EHOUR_HOME="/opt/ehour"

...


4. Configure database

4a. Create initial datamodel

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

MySQL

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

 PostgreSQL

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

4b. Configure eHour to connect to the database

Configure to which database eHour connects by changing the ehour.properties. The instructions are different per database, follow these steps.

...

4c. Add database drivers to Tomcat

MySQL

Download the Connector driver from https://dev.mysql.com/downloads/connector/j/. Choose the platform indepent option to download the tarred or zipped driver. Copy the mysql-connector-java-8.xx.jar to Tomcat's lib directory.

PostgreSQL

Download the JDBC driver from https://jdbc.postgresql.org/download/postgresql-42.2.5.jar. Copy the downloaded jar file to Tomcat's lib directory.

5. Install eHour in Tomcat

Copy the WAR file from eHour's app directory to Tomcat's webapp directory. That's it.

Note

The filename of WAR file dictates the URL. When the WAR file that you copy to Tomcat's webapp directory is named "ehour-1.4.2.war", the URL where eHour is available will be http://localhost:8080/ehour-1.4.2/. When you want the URL to be http://localhost:8080/ehour, make sure to rename the WAR to ehour.war.

...


6. 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