I’m pretty new here. Im trying host DHIS2 locally on Ubuntu 22.04LS. So i have followed each and every step mentioned in the official documentation(Installation - DHIS2 Documentation) and at the end after starting the tomcat sucessfully, when I go to http://localhost:8080, I’m only getting to the tomcat welcom page, not the DHIS2 login page. Im not sure what exactly wrong here. Any help is appreciated.
PS: I installed tomcat9 instead of tomcat8.
Please check in the directory you installed Tomcat, what is the name of the file in the CATALINA_HOME/webapps folder?
If the war file is called root.war please rename it to dhis2.war and also check in the folder (CATALINA_HOME/conf/Catalina/localhost) for the .xml file which has a value: docBase.
If none of the above works, please check the Catalina.out log? Would you share the complete log (without the sensitive/authentication info)?
Thanks for the info. First, sorry I meant the opposite, we’re supposed to rename the dhis2.war file to ROOT.war. However, since the webapps folder doesn’t have a “ROOT.war” file then this is the issue. Make sure to copy the dhis2.war file and rename it to ROOT.war.
Please try to repeat the following installation steps again:
The next step is to download the DHIS2 WAR file and place it into the webapps directory of Tomcat. You can download DHIS2 WAR files from the following location:
https://releases.dhis2.org/
Move the WAR file into the Tomcat webapps directory. We want to call the WAR file ROOT.war in order to make it available at localhost directly without a context path:
mv dhis.war tomcat-dhis/webapps/ROOT.war
DHIS2 should never be run as a privileged user. After you have modified the setenv.sh file, modify the startup script to check and verify that the script has not been invoked as root.
#!/bin/sh
set -e
if [ "$(id -u)" -eq "0" ]; then
echo "This script must NOT be run as root" 1>&2
exit 1
fi
export CATALINA_BASE="/home/dhis/tomcat-dhis"
/usr/share/tomcat8/bin/startup.sh
echo "Tomcat started"