Install on Windows

Table of Contents

Install instructions eHour.war on Windows

eHour requires a Java JDK, the Apache Tomcat servlet container and a MySQL database to be installed. Although this may seem as a lot, installation is easy.

When you are upgrading an existing installation of eHour, please see the upgrade instructions; do not follow the installation instructions again.

Java 1.5+

eHour is developed using Java technology so you'll need to install the Java runtime environment (version 1.5 or newer) first.

Download and install the latest version from Sun's site.

MySQL 5+ installation and configuration

For now only MySQL is supported as the back-end database. If you don't have MySQL (version 5+) installed, download it from http://dev.mysql.com/downloads/mysql/5.0.html#win32. When you're not afraid of the DOS prompt downloading the Essentials package should be sufficient. However the plain setup (2nd link on the MySQL site) is the easiest to deal with.

Install MySQL (version 5+) by downloading it from MySQL's site and follow their setup instructions.
When you're not afraid of the DOS prompt downloading the Essentials package should be sufficient. However the plain setup (2nd link on the MySQL site) is the easiest to deal with.

With MySQL downloaded, install it as follow:

  • In the setup choose a typical or complete installation and click next to copy the files.
  • After copying you have the option to register at mysql.com; do so if you please or skip registration.
  • When MySQL is installed you can choose to configure the server instance. Choose a standard configuration (or click detailed if you want to go into the details, not covered here).
  • Keep Install as Windows Service enabled. This makes sure that MySQL is started in the background when the computer boots up
  • Change the password of the root user. Do remember which password you used as it's needed later on
  • Click next and execute!.
Create database

The easiest way to create the eHour database is to install the MySQL query tool and click your way through everything.
You can download the query tool from the the MySQL site. Just follow the default settings when installing it.


When you first run the query tool you end up with the following screen where you have to fill in the database connection details.

For server host use 127.0.0.1 if you installed MySQL locally. Username should be root and the password is the password you entered in the previous step.
After clicking OK the Query browser will complain about not having specified a default schema. Click ignore.


In the Query Browser you have 3 panels, click on the panel called "Schemata" and select "create new schema". As schema name choose "ehour" and click ok.

Install eHour database

With the ehour database created it's time to create the database tables and fill them with some static data.

In the directory where you unpacked the binary distribution there is a sql/mysql/install directory with a fresh.mysql.sql script in it.
Load this script by going to file -> open script. Make sure the ehour schema is selected in the Schemata window and click execute to initialize the database.

Now on to the final part, Apache Tomcat

Apache Tomcat 5.5 installation and configuration

Install Tomcat

Apache Tomcat acts as the container server which runs the application.
If you don't have Tomcat installed yet, download the Windows Service installer from [http://tomcat.apache.org/download-55.cgi#5.5.20].

Install instructions for Tomcat can be found on their site.

Install the MySQL JDBC connector

Now that you have Tomcat installed you need to make it MySQL-aware by installing the MySQL JDBC connector. The JDBC connector can be fetched from [http://dev.mysql.com/downloads/connector/j/5.0.html].

Version 5.1.5 of the MySQL JDBC connector contains a bug that prevents eHour from working correctly. eHour was tested with version 5.0.8.

Unpack the downloaded archive and copy the extracted mysql-connector-5.x.x-bin.jar file to Tomcat's common/lib (Tomcat 5) directory or the lib directory on Tomcat 6.

Hook up eHour to Tomcat

First make sure that Tomcat isn't running. Navigate to the Tomcat's bin directory and run tomcat5w.exe to check the status.
In the conf/tomcat directory of the eHour distribution you'll find the ehour_mysql.xml config file.

Edit this file in your favourite text-editor and replace the following fields:

@ehour.db.username the MySQL username
@ehour.db.password the MySQL password
@ehour.db.hostname the hostname/IP address of your MySQL server
@ehour.db.name the eHour MySQL database

When you're done editing save this file as ehour.xml in the conf/Catalina/localhost directory of your Tomcat install directory. When running Tomcat 6 create this directory first.

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

In the install directory of Tomcat create a directory named deploy

From the eHour distribution copy the ehour-0.8.4.war into this directory.

Start it all up !

MySQL is probably already running, otherwise you wouldn't be able to install the database in a previous step.

Start Tomcat by running tomcat5.exe 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/].

Labels

war war Delete
install install Delete
windows windows Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Feb 19

    Anonymous says:

    The query tool no longer exists, now the replacement tool is MySQL Workbench 5.2...

    The query tool no longer exists, now the replacement tool is MySQL Workbench 5.2.

    Can you make instructions on how to locate and get access to fresh.mysql.sql ???

    Kind Regards

    Les

  2. May 11

    Anonymous says:

    Hi, i followed the instructions and have the following message : "serveur start...

    Hi,

    i followed the instructions and have the following message : "serveur startup in 1390 ms" in tomcat and "La ressource demandée (/ehour) n'est pas disponible." in my browser ?

    Can someone help me on this ?

  3. May 29

    Anonymous says:

    will i be able to install on my website? vs using a pc?

    will i be able to install on my website? vs using a pc?

Add Comment