This project is no longer updated. Check out our container solution: https://github.com/baosystems/docker-dhis2
Install PostgreSQL, Tomcat, Nginx, and DHIS2 on CentOS 7.
Do not use this configuration in any production workloads! Configurations are intended for local development environments only!
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.
git clone https://github.com/baosystems/dhis2-centos.git
cd dhis2-centos
vagrant upWait a while... then, you can browse http://127.0.0.1:8080
It is required to SSH into the Virtual Machine by running:
vagrant ssh
sudo -iservice tomcat stop
psql -U dhis -d dhis2 -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;"
logoutPut 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.sqltail -f /opt/dhis2/logs/dhis.logservice 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 startAlternatively, 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.
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.