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:
make sure that your current directory is the directory you created dhis instance inside it, maybe your logged in as a root and you installed the instance in the home directory of the dhis user as DHIS guide, in dhis guide it created dhis instance inside /home/dhis of the dhis user. if you followed the guide to the letter then maybe you are trying to access the tomcat-dhis/webapps/ directory from the root’s home directory.
to make sure if the tomcat-dhis directory exists in the directory you are currently in, view the content of the directory you are currently in using the following command
ls
it will display the list of directories you have if there is no tomcat-dhis directory in your current path, then lookup where you installed the instance. maybe it’s inside the /home/dhis/tomcat-dhis instead, maybe you need to either use:
or first cd to the directory you created the instance inside, for example:
cd /home/dhis/
to make it your current directory, then use the command you previously used :
sudo mv dhis.war tomcat-dhis/webapps/ROOT.war
after that you need to restart the tomcat server, to do that you also need to provide a valid path either to restart or to use the other command such as: