Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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:

$CATALINA_HOME/bin/startup.sh
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:       
/usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
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?

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
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. –  sportsfan72 Sep 25 '13 at 20:41
    
You need to run the startup script with sudo. –  zwets Sep 25 '13 at 21:11

1 Answer 1

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
COMMAND   PID    USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
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

Your Answer

 
discard

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.