So I've followed the list of steps on : https://www.digitalocean.com/community/articles/how-to-install-apache-tomcat-on-ubuntu-12-04.

When I try to run the startup script, I get this message:

Using CATALINA_BASE:   /usr/share/tomcat7
Using CATALINA_HOME:   /usr/share/tomcat7
Using CATALINA_TMPDIR: /usr/share/tomcat7/temp
Using JRE_HOME:        /usr/lib/jvm/default-java
Using CLASSPATH:       
touch: cannot touch `/usr/share/tomcat7/logs/catalina.out': No such file or directory
/usr/share/tomcat7/bin/catalina.sh: 389: /usr/share/tomcat7/bin/catalina.sh: cannot create /usr/share/tomcat7/logs/catalina.out: Directory nonexistent

What am I supposed to do to fix this? And am I supposed to modify the CATALINA_BASE variable?

  • Why not just run sudo apt-get install tomcat7?
    – Braiam
    Sep 25, 2013 at 20:39
  • 1
    I have, but I need to start tomcat. Sep 25, 2013 at 20:41
  • 1
    I did sudo apt-get install tomcat7 then sudo apt-get install default-jdk, and then I modified the /.bashrc file by adding export JAVA_HOME=/usr/lib/jvm/default-java and export CATALINA_HOME=~/path/to/tomcat. Sep 25, 2013 at 20:41
  • You need to run the startup script with sudo.
    – zwets
    Sep 25, 2013 at 21:11

2 Answers 2


Your problem is that you cannot mix guides. Just revert the modifications to the ~/.bashrc file. With the first command you already have tomcat installed but without starting the webserver. Just run sudo service tomcat7 start then go to your web browser and type http://localhost:8080 and done.

enter image description here

sudo lsof -i:8080
java    11399 tomcat7   44u  IPv6 632616      0t0  TCP *:http-alt (LISTEN)
  • I undid my changes and ran the start command and got: ` * Starting Tomcat servlet engine tomcat7 [ OK ]` Sep 25, 2013 at 21:01
  • When I type ps -ef | grep java | grep 8080, I don't get anything. And it's running on a server, so when I try servername:8080 I get "This webpage is not avaiable". Sep 25, 2013 at 21:03
  • And as for mixing guides, I only followed one with 4 steps, not sure why it wouldn't work. Sep 25, 2013 at 21:06
  • Use sudo lsof -i:8080. See my updated answer.
    – Braiam
    Sep 25, 2013 at 21:09
  • I get the same results as you for the most part. I'm assuming that it means tomcat is indeed running. This is running on a server, and I attempt to access it using 'servername:8080', but I get "This webpage is not available" Any suggestions? Sep 25, 2013 at 21:15

You will need to create logs folder and catalina.out file under the folder that it is complaining for 'no such file or directory' and give chmod 766 catalina.out. After that run $CATALINA_HOME/bin/startup.sh again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.