Chapter 20. DHIS2 Tools Guide

DHIS2 team


Table of Contents

20.1. Overview
20.2. Architecture
20.3. Installation
20.4. DHIS2 tools reference
dhis2-instance-create — Creates a new dhis2 instance
dhis2-startup — Starts a dhis2 instance
dhis2-shutdown — Stops a dhis2 instance
dhis2-clone — Clones the database of one instance to another instance
dhis2-deploy-war — Deploys a war file
dhis2-logview — Shows log file
dhis2-logtail — Shows the bottom log file in real time. Type Ctrl-C to exit.
dhis2-create-admin — Create a user for administering dhis2 instances
dhis2-nginx — Configure nginx with a specified or sample file
dhis2-integrity — Check database integrity of a DHIS2 instance
dhis2-restoredb — Restore a database dump to a dhis2 instance.
dhis2-backup — Create a backup of a dhis2 database
dhis2-delete-instance — Deletes the specified DHIS2 instance and its database.
20.5. Troubleshooting guide

20.1. Overview

The dhis2-tools package is a collection of tools and utilities for installing and managing DHIS2 applications on an ubuntu server. The tools provide the ability to go from a "blank" server with only ssh running, to a fully functioning dhis2 installation in a matter of minutes. Used together they can also be combined into automated scripts to facilitate rapid reconstruction of a given configuration.

The tools have been collected and developed over a number of years. This documentation differs in some respects from the installation guidelines in the dhis2 user manual in that it describes the implementation of a specific approach rather than the more general tutorial nature of the user manual. It is recommended that implementers do also study the material in the user manual as it provides additional information, eg. how to tune the postgresql server. The rationale of the tools described in this manual includes:

  1. to ease the process of installation so that it can be easily explained, documented and executed;

  2. to assist system administrators (particularly, but not exclusively, lesser experienced ones) to implement reasonable security measures by default and thus minimize vulnerabilities brought about through human error and negligence;

  3. to provide a set of scripts to assist the administrator with tasks related to managing their dhis2 system, beyond the one off process of installation.

The package remains a work in progress and there are a number of areas where it could and should (and hopefully will) be improved. For example,

  1. currently the tuning of the postgresql database is not covered. There are ways in which this could be at least semi automated;

  2. nginx configuration is assisted by means of providing a sample configuration file. This configuration could be made more dynamic;

  3. the format of what is currently packaged is an Ubuntu linux deb package. There is also considerable interest in the Redhat/CentOS flavour of linux for running dhis2. It should be possible to offer a yum format package to facilitate use on these systems.