DHIS2 Installation on Windows Local Server
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.
- Install JDK or JRE: https://www.java.com/en/download/
- Install Postgresql: https://www.postgresql.org/download/windows/
- Install Tomcat -8.0: https://tomcat.apache.org/download-80.cgi
- Step-02: Environment Variables Setup:
2.1 Under “System variables”, click on the “New” button and add the following: Variable Name: DHIS2_HOME Value: C:\DHIS2
2.2 Add JAVA_OPT as below: Variable Name: JAVA_OPTS Value: -Xms1024m -Xmx2048m -XX:PermSize=256m -XX:MaxPermSize=1024m
2.3 JDK Path Variable: Add the path variable into the system variables: C:\Program Files (x86)\Java\jdk1.8.0_31\bin
- Step-3: Create Database: Open the Pg-Admin and follow the below steps:
- 3.1 Login to Pg-Admin
-
- 3.2 Right click “Login/Group Roles” and create new login role “dhis”
-
- 3.3 Create password and then save:
- 3.4 Database Creation: Right click databases and create a new database “dhis2” set Owner as “dhis”
- Step-04: Create “dhis.conf” file: Create a folder ”C:\DHIS2” in the below path that already you have added in your environment variable:
- 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
- Step-07: Copy the war file to your tomcat “webapps” folder as below:
- Step-08: Run “Tomcat8.exe” as below:
- Step-09: Close the above window and run “Tomcat8w.exe” then click on the “start” button
- Step-10: Go to the web browser and browse the server: http://localhost:8080/dhis/
Username: admin Password: district
- Step-11: You can upload the demo data from the below link:
- Please Feel free to contact with me:
Mohammad Julhas Sujan DHIS2 Consultant Department of Informatics University of Oslo Cell: +8801989-442856 Email: julhaspustcse@gmail.com