0
I have created a tomcat.sh file so that I can start and stop tomcat via the terminal. I placed the file inside the /bin folder and performed chmod u+x on it to make it executable.
But then when I try the command tomcat start it just gives me the following:
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/java-6-sun-1.6.0.26/jre
Using CLASSPATH: /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
touch: cannot touch '/usr/share/tomcat7/logs/catalina.out': Permission denied
/usr/share/tomcat7/bin/catalina.sh: 538: cannot create /usr/share/tomcat7/logs/catalina.out: Permission denied
I'm a new to Linux. Please help me set up proper permissions for this. If not, then maybe I'll just move my tomcat folder elsewhere.
First of all, you should place the file in
/usr/local/binrather than/bin. Also, if the file is calledtomcat.sh, you won't really execute it when you calltomcat, since the name is different. What's the content of yourtomcat.shfile? Have you tried just running tomcat withsudo tomcat start? – slhck – 2012-01-27T09:34:02.860