DHIS2
installation
on windows
local machine

DHIS2 Installation on Windows Local Server

Installing DHIS2 is not a very difficult task. There are a few things you need to be aware of. Before installing, you need to know which version of DHIS2 works perfectly with Tomcat and PostgresSQL easily. Let's see the step by step DHIS2 installation process.


The WAR file requires you to install a Java servlet container (like Tomcat or Jetty) and a relational database (PostgreSQL, MySQL and H2 are supported), and is recommended for server setups and environments with high volumes of data and traffic. The latest version is maintained with bug-fixes and minor improvements. You can always get the latest stable release at stable.dhis2.org. Check out the installation guide for Ubuntu Linux here. For the bleeding edge build check out the continuous integration server. WAR files are copied from our continuous integration server where you can find revision number and build time.

Step-01: Necessary Software Installation: You need to ensure the below softwares are running in your machine.

DHIS2 Version upto 2.32, Download full package Note: Don’t start the tomcat in this step.

Step-02: Environment Variables Setup: Go to → My Computer (Right Click) → Properties → Advanced system settings → Environmental Variables


eportal



2.1 Under “System variables”, click on the “New” button and add the following:

Variable Name: DHIS2_HOME
Value: C:\DHIS2


dhis2


2.2 Add JAVA_OPT as below:

Variable Name: JAVA_OPTS
Value: -Xms1024m -Xmx2048m -XX:PermSize=256m -XX:MaxPermSize=1024m

dhis2


2.3 JDK Path Variable: Add the path variable into the system variables: C:\Program Files (x86)\Java\jdk1.8.0_31\bin

dhis2


Step-3: Create Database: Open the Pg-Admin and follow the below steps:
3.1 Login to Pg-Admin-4: Please enter your master password that you set during installation

dhis2


3.2 Right click “Login/Group Roles” and create new login role “dhis”

dhis2


Don’t forget to allow login privilege:

dhis2


3.3 Create password as `dhis` and then save:


dhis2



3.4 Database Creation: Right click on `Databases` and create new database as “dhis2” & set owner as “dhis”


dhis2



3.5 Create PostGIS extension: Right click on `Extensions` and select extension name as `postgis`


dhis2

Step-04: Create “dhis.conf” file: Create a folder ”C:\DHIS2” in the below path that already you have added in your environment variable:


dhis2


You can download from here Download now

Step-05: Open the “dhis.conf” file and paste the below lines:

				# Hibernate SQL dialect
				connection.dialect = org.hibernate.dialect.PostgreSQLDialect
				# JDBC driver class
				connection.driver_class = org.postgresql.Driver
				# Database connection URL
				connection.url = jdbc:postgresql:dhis2
				# Database username
				connection.username = dhis
				# Database password
				connection.password = dhis
				# Database schema behavior, can be validate, update, create, create-drop
				connection.schema = update

				# Encryption password (sensitive)
				encryption.password = abcd

				
Step-06: Download the latest war file from: https://www.dhis2.org/downloads
Download: https://www.dhis2.org/downloads

dhis2



Step-07: Copy the war file to your tomcat “webapps” folder as below:
C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps

dhis2



Step-08: Run “Tomcat9.exe” as below:

Location: C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin

dhis2



dhis2



Step-09: Close the above window and run “Tomcat9w.exe” then click on the “start” button

dhis2



Step-10: Go to the web browser and browse the server: http://localhost:8080/dhis/

				http://localhost:8080/dhis
				Username: admin
				Password: district

				

dhis2


Step-11: You can upload sample data from the below link:
https://www.dhis2.org/downloads

dhis2

If you face errors like `404-not-found` or `out of shared memory`, you can follow this post: http://dhis2trainingland.com/eportal/?tutorial=dhis2-404-not-found-error

DHIS2 instillation in linux

https://docs.dhis2.org/2.28/en/implementer/html/install_server_setup.html https://github.com/adeelshahid/dhis2-core-ansible

DHIS2 instillation in Mac OSX

https://dhis2.github.io/guides/01-dhis2-basic-setup

Configure your domain and hosting in Digital Ocean Droplet

http://dhis2trainingland.com/eportal/?tutorial=domain-and-hosting-configuration-in-digital-ocean

Last updated: 2019-06-18