Setting Up DHIS2.Live on Windows Laptops/Desktops (November 2013)

 
DHIS2 Live
on Windows laptops/desktops
 (NOT for production servers!!)
 
Knut Staring
November 2013
 
Preparation
 
First check if your Windows is 32 or 64 bit
Startbutton -> Right click Computer ->Properties
Optional: Notepad++ and psqlodbc.msi
 
Java and Postgres installation
 
Choose the Java installer and run with default
options
Install PostgreSQL 9.2 (or later) in C:\Program
Files. Password can be “Dhis2011” (capital D).
In the final window, UNTICK the Stack Builder
option
 
 
 
 
Add Postgres to Windows Path
 
Startbutton -> 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.2\bin
Click OK, OK, OK
 
PgAdmin
 
Open PgAdmin and log in with “Dhis2011”
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”
 
If you want the demo database
 
If you want to start with an empty database,
then skip this slide
Download the demo data from
http://www.dhis2.org/download/resources/d
his2-demo.zip
Unzip the download to C:\
Open a Command Prompt window
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
“hibernate.properties” in Notepad++ or
WordPad (not NotePad)
Remove all the “#” characters
Add a “#” character in front of the top 5 lines
 
The file 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=FALS
E
#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
 
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
database
If this does not work, try
http://127.0.0.1:8082
 
Updating the version of DHIS
 
Download a new version of DHIS2 from
http://dhis2.org/downloads
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
 
Backup and restore
 
Startbutton -> “command”
Use cd to navigate to where you want to have your backups
 
Backup
pg_dump –U dhis –f dhis2sl_20101214.pgdump  -d dhis2
 
Restore
Create a new empty database in PgAdmin, eg. Dhis2sl3
psql –U dhis –f dhis2sl_20101214 –d dhis2sl3
 
 
 
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
hibernate.properties
Slide Note
Embed
Share

Learn how to install and configure DHIS2.Live on Windows laptops and desktops for testing purposes, including setting up Java, PostgreSQL, adding to the Windows path, configuring PgAdmin, and preparing the demo database. Follow step-by-step instructions and images to successfully set up DHIS2.Live on your Windows system.

  • DHIS2
  • Windows
  • Installation
  • Configuration
  • PostgreSQL

Uploaded on Sep 23, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. DHIS2 Live on Windows laptops/desktops (NOT for production servers!!) Knut Staring November 2013

  2. Preparation First check if your Windows is 32 or 64 bit Startbutton -> Right click Computer ->Properties Java (JRE) (32 or 64 bit) http://www.oracle.com/technetwork/java/javase /downloads/jre7-downloads-1880261.html PostgreSQL (32 or 64 bit) http://www.enterprisedb.com/products-services- training/pgdownload#windows dhis2-live.zip http://www.dhis2.org/downloads Optional: Notepad++ and psqlodbc.msi

  3. Java and Postgres installation Choose the Java installer and run with default options Install PostgreSQL 9.2 (or later) in C:\Program Files. Password can be Dhis2011 (capital D). In the final window, UNTICK the Stack Builder option

  4. Add Postgres to Windows Path Startbutton -> 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.2\bin Click OK, OK, OK

  5. PgAdmin Open PgAdmin and log in with Dhis2011 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. If you want the demo database If you want to start with an empty database, then skip this slide Download the demo data from http://www.dhis2.org/download/resources/d his2-demo.zip Unzip the download to C:\ Open a Command Prompt window 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 hibernate.properties in Notepad++ or WordPad (not NotePad) Remove all the # characters Add a # character in front of the top 5 lines

  8. The file 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=FALS E #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 http://localhost:8082 with and empty database If this does not work, try http://127.0.0.1:8082

  10. Updating the version of DHIS Download a new version of DHIS2 from http://dhis2.org/downloads 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 Use cd to navigate to where you want to have your backups Backup pg_dump U dhis f dhis2sl_20101214.pgdump -d dhis2 Restore Create a new empty database in PgAdmin, eg. Dhis2sl3 psql U dhis f dhis2sl_20101214 d dhis2sl3

  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 hibernate.properties

Related


More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#