sportsfan72
sportsfan72

Reputation: 301

Tomcat startup script not running

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 $CATALINA_HOME/bin/startup.sh, 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:
/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:

What am I supposed to do to get that startup script to work?

Upvotes: 2

Views: 18118

Answers (2)

smcg
smcg

Reputation: 3273

You installed Tomcat as the root user (which is the default installation via apt-get), and so some of its directories are under ownership of root. Which means you would have to call the startup script using sudo ./startup.sh.

I don't recommend the apt-get installation of tomcat at all, because it installs files all over your system and it can get rather confusing. I recommend downloading Tomcat directly from the Apache site instead.

Upvotes: 3

iros
iros

Reputation: 66

Try to:

mkdir /usr/share/tomcat7/logs/; chown user_running_tomcat /usr/share/tomcat7/logs

Upvotes: 3

Related Questions