Download presentation
Published byMoris Simpson Modified over 8 years ago
1
DHIS2 Live on Windows laptops/desktops (NOT for production servers!!)
Knut Staring January 2016
2
Preparation Java 8 (JRE): http://java.com/en/download/manual.jsp
PostgreSQL 9.5 (or later): dhis2-live.zip Notepad++ Gow:
3
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 option
4
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 semicolon After the new semicolon, add C:\Program Files\PostgreSQL\9.5\bin Click OK, OK, OK
5
PgAdmin 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 Database…” Enter “dhis2” for “Name” and “dhis” for “Role”
6
Demo database Skip this slide if you want an empty database
Download the demo 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
7
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
8
dhis.conf should look like this
#hibernate.dialect = org.hibernate.dialect.H2Dialect #hibernate.connection.driver_class = org.h2.Driver #hibernate.connection.url = jdbc:h2:./database/dhis2;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE #hibernate.connection.username = sa #hibernate.connection.password = hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect hibernate.connection.driver_class = org.postgresql.Driver hibernate.connection.url = jdbc:postgresql:dhis2 hibernate.connection.username = dhis hibernate.connection.password = dhis hibernate.hbm2ddl.auto = update
9
Start up Put a shortcut to dhis2-live.exe on your dashboard and click on it DHIS2 will start and open your browser to with and empty database If this does not work, try
10
Updating the version of DHIS
Download a new version of DHIS2 from Stop DHIS2 Live Go to the folder webapps/dhis and delete everything Copy the new dhis2.war to the same folder Rename to dhis2.zip and unzip
11
Backup and restore Startbutton -> “command” Backup Restore
Use cd to navigate to where you want to have your backups Backup pg_dump –U dhis –f dhis2sl_2016.sql -d dhis2 Restore Create a new empty database in PgAdmin, eg. dhis2_sl3 psql –U dhis –f dhis2sl_2016.sql –d dhis2_sl3
12
Optional: Multiple DHIS2 Live
More than one DHIS2 Live can run simultaneously 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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.