The eHour WAR distribution is intended for deployment into an existing application server.
The way of deployment changed with version 1.4.2. These instructions only apply to version 1.4.2, for older version please use these steps.
The Java runtime environment is not bundled with eHour. If Java is not installed, download and install the latest JRE from Oracle's site. Java 7 or higher is required.
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
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.
Set the location of your eHour Home directory by creating an environment variable EHOUR_HOME with the absolute path of the eHour directory.
Locate the bin directory of your Tomcat install. It contains the catalina.bat and other scripts which startup Tomcat. In this directory create a file setenv.bat or edit it when it already exists.
Assuming that your eHour Home directory is at c:\ehour, add to the contents of this file the line
Of course change the path to where your EHOUR_HOME dir is actually located
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:
Skip this step when you're performing an upgrade.
Follow the MySQL installation guide (Linux, Setup MySQL on Windows) to install and setup your database.
Follow the PostgreSQL install guide to install and setup your database.
Configure to which database eHour connects by changing the ehour.properties. The instructions are different per database, follow these steps.
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.
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.
Copy the WAR file from eHour's app directory to Tomcat's webapp directory. That's it.
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