Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I've followed the list of steps on :

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/ 389: /usr/share/tomcat7/bin/ 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?

share|improve this question
Why not just run sudo apt-get install tomcat7? – Braiam Sep 25 '13 at 20:39
I have, but I need to start tomcat. – sportsfan72 Sep 25 '13 at 20:41
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. – sportsfan72 Sep 25 '13 at 20:41
You need to run the startup script with sudo. – zwets Sep 25 '13 at 21:11

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)
share|improve this answer
I undid my changes and ran the start command and got: ` * Starting Tomcat servlet engine tomcat7 [ OK ]` – sportsfan72 Sep 25 '13 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". – sportsfan72 Sep 25 '13 at 21:03
And as for mixing guides, I only followed one with 4 steps, not sure why it wouldn't work. – sportsfan72 Sep 25 '13 at 21:06
Use sudo lsof -i:8080. See my updated answer. – Braiam Sep 25 '13 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? – sportsfan72 Sep 25 '13 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/ again.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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