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 package1.2.1 Select all options during installation including pgAdmin 4 and Stack Builder.
1.2.2 In Stack Builder >> Select PostGIS under Spatial Extensions >> PostGIS 2.5 Bundle for PostgreSQL 11 (32/64 bit)
Step-02: Environment Variables Setup: Go to → My Computer (Right Click) → Properties → Advanced system settings → Environmental Variables
Variable Name: DHIS2_HOME
Value: C:\DHIS2
Variable Name: JAVA_OPTS
Value: -Xms1024m -Xmx2048m -XX:PermSize=256m -XX:MaxPermSize=1024m
Don’t forget to allow login privilege:
# 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
Location: C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin
http://localhost:8080/dhis Username: admin Password: district
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
Last updated: 2019-06-18