Setting up DHIS2 Live on Windows Desktop/ Laptop (Nov 2011)
Learn how to set up DHIS2 Live on Windows machines for testing purposes, not production servers. Follow step-by-step instructions to install Java, PostgreSQL, add PostgreSQL to Windows path, configure PgAdmin, edit configuration files, and start DHIS2. Includes images for clarity.
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
DHIS2 Live on Windows laptops/desktops (NOT for production servers!!) Knut Staring November 2011
Preparation First check if your Windows is 32 or 64 bit Startbutton -> Right click Computer ->Properties Java (JRE) (32 or 64 bit) PostgreSQL (32 or 64 bit) dhis2-live.zip Available on DVD or from http://dhis2.org Optional: Notepad++ and psqlodbc.msi
Java and Postgres installation Choose the Java installer and run with default options Install PostgreSQL 9.1 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.1\bin Click on 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
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