DHIS.war move Error during install

I followed this instruction:


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 **(DHIS Guide)**
sudo mv dhis.war tomcat-dhis/webapps/ROOT.war **(http://dhis-2.blogspot.com/)**

But ran into this error:


mv: cannot move ‘dhis.war’ to ‘tomcat-dhis/webapps/ROOT.war’: No such file or directory

How do I resolve it?

Thank you!

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


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:

sudo mv dhis.war /home/dhis/tomcat-dhis/webapps/ROOT.war

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:

sudo tomcat-dhis/bin/shutdown.sh
sudo tomcat-dhis/bin/startup.sh
tail -f tomcat-dhis/logs/catalina.out

Thanks so much for your help.

Will be on site next week to implement

When I try to run this
~$ sudo -u dhis tomcat-dhis/bin/startup.sh,

I get this error:

sudo: tomcat-dhis/bin/startup.sh: command not found

I have done everything else right

did you create the user dhis?
if so the dhis tomcat instance might also be in dhis user’s home directory
try using the following command instead:

sudo /home/dhis/tomcat-dhis/bin/startup.sh

can you execute the following command and tell us what is outputted to the screen:

ls /home/

so I make sure whether you created the dhis user or you directly installed the instance in the current logged in user