DHIS2 INSTALLATION 1. Java Runtime Environment version 6 If this ...

completemiscreantData Management

Nov 28, 2012 (4 years and 10 months ago)

1,286 views

DHIS2 INSTALLATION


1.

Java Run
time Environment version 6



If this is already installed, the environment variable JAVA_HOME will exist and have a
value like C:
\
Program Files
\
Java
\
jre6. If this is not already installed, install the Java Development
Kit, jdk
-
6u17
-
windows
-
i586.exe, which will install Runtime Environment.

2.

Copy DHIS2 files



Create a directory C:
\
DHIS2.
Create an environment variable with the nam
e
DHIS2_HOME and the value C:
\
DHIS2.
Copy the following files into this directory:



dhis2
-
2.0.4.war



hibernate.properties.mysql



hibernate.properties.postgres



dhis2demo.backup



GHBackup100807.sql


3A.

MySQL Database



Install the database software
from mysql
-
essential
-
5.1.44
-
win32.msi. Perform a custom
configuration. The key points are to use the InnoDB database, use the UTF
-
8 character set,
include MySQL in the PATH variable, set and record the root password, and do not allow remote
root logins.



Start the MySQL Command Line Editor. When requested, enter the root password.
Enter the following commands:


CREATE DATABASE DHIS2;


CREATE USER "DHIS" IDENTIFIED BY "test";


GRANT ALL ON DHIS2.* TO DHIS;


USE DHIS2;

To load the demo data, enter the co
mmand


SOURCE C:
\
DHIS2
\
GHBackup100807.sql;

Enter the command


QUIT;



For MS Access users, it will be convenient to install the ODBC Driver, mysql
-
connector
-
odbc
-
5.1.6
-
win32.msi. You can then use Control Panel>>Administrative Tools>>Data Sources
(ODBC) to

create an machine connection to the dhis2 database. For those accustomed to a
database explorer interface, install Toad from ToadforMySQLFreeware_460531.exe.


3B.

Postgres Database



Install the database software from postgresql
-
8.4.3
-
1
-
windows.exe.



Start the Postgres explorer interface, pgAdminIII. Select File>>New Server. Set the
following properties:



Name


dhis2



Host


localhost



Username

dhis



Password

test



Store password

unchecked

Select OK, then close pgAdminIII. To load the demo data,

open a DOS command window and
enter the commands



psql dhis2 <c:
\
dhis2
\
dhis2demo.backup



exit



For MS Access users, it will be convenient to install the ODBC Driver, psqlodbc.msi. You
can then use Control Panel>>Administrative Tools>>Data Sources (ODB
C) to create an machine
connection to the dhis2 database.


4.

Apache Tomcat Web Server



Install the software from apache
-
tomcat
-
6.0.16.exe. Note the username and password.



Define an evironment variable JAVA_OPTS with the value

-
Xms512m
-
Xmx1024m
-
XX:P
ermSize=256m
-
XX:MaxPermSize=768m

In Control Panel>>Administrative Tools>>Services restart the Apache Tomcat service so the
options will take effect.


5.

Geoserver GIS (optional)



Install the software from geoserver
-
2.0.1.exe


6.

BIRT Report Generator (optional)



Unzip eclipse
-
reporting
-
helios
-
win32.zip and run the two .exe files


7.

Start DHIS2



Copy either hibernate.properties.mysql or hibernate.properties.postgres to
hibernate.properties in C:
\
DHIS2. You can change from one
database to the other by doing this
whenever DHIS2 is stopped in Tomcat.



Start the Tomcat Manager (or in your browser go to http://localhost:8080/manager/html).
At the bottom of the page, select c:
\
dhis2
\
dhis2.war as the WAR file to upload, then select
Deploy. DHIS should start and be listed as a link. Select it. Save the URL as a favorite.



The login/password for MySQL is admin/district, for Postgres it is admin/district232.