Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

baosystems/dhis2-centos

Repository files navigation

Archive notice

This project is no longer updated. Check out our container solution: https://github.com/baosystems/docker-dhis2

About

Install PostgreSQL, Tomcat, Nginx, and DHIS2 on CentOS 7.

Warning

Do not use this configuration in any production workloads! Configurations are intended for local development environments only!

Using

Install VirtualBox and Vagrant for your platform. Then, in a terminal, navigate to this directory and run vagrant up. After provisioning is complete, DHIS2 will be accessible at http://localhost:8080.

tl;dr

git clone https://github.com/baosystems/dhis2-centos.git
cd dhis2-centos
vagrant up

Wait a while... then, you can browse http://127.0.0.1:8080

Maintenance

It is required to SSH into the Virtual Machine by running:

vagrant ssh
sudo -i

Clear out DHIS2 database

service tomcat stop
psql -U dhis -d dhis2 -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;"
logout

Load your own DHIS2 database

Put your SQL file into the repository where you cloned it (on your host machine). Clear out database as described above. Shared files are in the /vagrant folder within the guest VM.

psql -U dhis -d dhis2 -f /vagrant/file.sql

Check DHIS2 logs

tail -f /opt/dhis2/logs/dhis.log

Load different DHIS2 version

service tomcat stop
cd /var/lib/tomcat/webapps
rm -f ROOT.war
rm -rf ROOT/
wget -O ROOT.war "https://s3-eu-west-1.amazonaws.com/releases.dhis2.org/2.32.0/dhis.war"
service tomcat start

Alternatively, open Vagrantfile in a text editor, edit the line containing ansible.extra_vars, specify the version you want, save the file, and then run vagrant --provision to re-setup.

Troubleshooting

ansible local provisioner:
* The following settings shouldn't exist: become

If you get an error about settings, make sure you have the latest versions of both Vagrant (2.0 or higher) and VirtualBox (5.2 or higher) installed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published