You are on page 1of 12

DHIS2 Live

on Windows laptops/desktops
(NOT for production servers!!)
Knut Staring
January 2016
• Java 8 (JRE):
• PostgreSQL 9.5 (or
• Notepad++
Java and Postgres installation
• Install Java 8 with defaults
• Install PostgreSQL 9.5 and be sure to
remember the password.
In the final prompt, UNTICK the Stack Builder
Add Postgres to Windows Path
• Start button -> Right click Computer ->Properties –>
Advanced System Settings-> Advanced ->
Environment Variables
• Select “Path” and Edit. Go to the end and add a
• After the new semicolon, add C:\Program
• Click OK, OK, OK
• Open PgAdmin and log in
• Right-click Login Roles and enter “dhis” for
Role name. In the “Definition” tab, enter
“dhis” for the password (twice)
• Right-click on “Databases” and select “New
• Enter “dhis2” for “Name” and “dhis” for “Role”
Demo database
• Skip this slide if you want an empty database
• Download sample data from
• Unzip the download
• Open a Command Prompt window and
navigate to the new unzipped folder
• Type the following on the command line:
psql –U dhis dhis2 < default.sql
DHIS2 Live
• Unzip the downloaded DHIS2 Live package
• In subfolder “conf” open “dhis.conf” in
Notepad++ or WordPad (not NotePad)
• Remove all the “#” characters
• Add a “#” character in front of the top 5 lines
dhis.conf should look like this
• hibernate.dialect =
• hibernate.connection.driver_class =
• hibernate.connection.url = jdbc:postgresql:dhis2
• hibernate.connection.username = dhis
• hibernate.connection.password = dhis

• = update
Start up
• Put a shortcut to dhis2-live.exe on your
dashboard and click on it
• DHIS2 will start and open your browser to
http://localhost:8082 with and empty
• If this does not work, try
Updating the version of DHIS
• Download a new version of DHIS2 from
• Stop DHIS2 Live
• Go to the folder webapps/dhis and delete
• Copy the new dhis2.war to the same folder
• Rename to and unzip
Backup and restore
Startbutton -> “command”
Use cd to navigate to where you want to have your backups

pg_dump –U dhis –f dhis2sl_2016.sql -d dhis2

• Create a new empty database in PgAdmin, eg. dhis2_sl3
• psql –U dhis –f dhis2sl_2016.sql –d dhis2_sl3
Optional: Multiple DHIS2 Live
• More than one DHIS2 Live can run
• They must be on different ports
• In subfolder “conf” open “jetty.port”
• Change the port number (stay above 8000)
• Change database name in dhis.conf