The moose likes Linux / UNIX and the fly likes Running tomcat in linux Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Reply Bookmark "Running tomcat in linux" Watch "Running tomcat in linux" New topic
Author

Running tomcat in linux

abhijeet srivastava
Greenhorn

Joined: Aug 22, 2006
Posts: 26
Hi all!

I have Fedora 6 and apache-tomcat-5.5.25 installed in /usr/local. and jdk1.5.0_09 in same /usr/local. I have set jdk path in etc/profile and is showing correctly.
I have set JAVA_HOME as /usr/local/jdk1.5.0_09.

but when I am starting tomcat by command-
su - tomcat -c /usr/local/apache-tomcat-5.5.25/bin/startup.sh

it is showing following error-
Using CATALINA_BASE: /usr/local/apache-tomcat-5.5.25
Using CATALINA_HOME: /usr/local/apache-tomcat-5.5.25
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-5.5.25/temp
Using JRE_HOME: /usr/local/jdk1.5.0_09
touch: cannot touch `/usr/local/apache-tomcat-5.5.25/logs/catalina.out': Permission denied
/usr/local/apache-tomcat-5.5.25/bin/catalina.sh: line 273: /usr/local/apache-tomcat-5.5.25/logs/catalina.out: Permission denied

Whats wrong??
Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959

Check the permission and ownership of /usr/local/apache-tomcat-5.5.25/logs. Did you use root to install it? If the ownership is root, then you may need to change your CATALINA_BASE to e.g. /home/tomcat/logs.


SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 12510

It's not a bad idea to create a tomcat user and group ID and chown the tomcat logs, work, temp and webapp directories. That way you can launch Tomcat in a secure environnment without things being so secure that Tomcat itself can't get anything done.

There are some installable packages that do all that and more, but there's not a definitive standard architecture that they all adhere to.


One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"
Aish Sk
Greenhorn

Joined: May 11, 2011
Posts: 1

I also need help in this topic. because i also meet with the same problem.

Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/share/java/jdk1.5.0_22
touch: cannot touch `/usr/local/tomcat/logs/catalina.out': Permission denied
user@WS@233:/usr/local/tomcat/bin$ ./catalina.sh: 344: cannot create /usr/local/tomcat/logs/catalina.out: Permission denied
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 4869

"Aish Sk", please see you private messages regarding an important administrative matter.

Regarding your question, I have a few for you:
1) What account are you logged in under?
2) What account are you running Tomcat under?
3) What is the ownership of the directory in question? Run "ls -al /usr/local/tomcat/logs/" and post the results.

Essentially, the account used to run Tomcat doesn't have write access to /usr/local/tomcat/logs/.


JBoss In Action
 
 
subject: Running tomcat in linux
 
Threads others viewed
Running tomcat apache 5.5 on fedora 14 problem
Running tomcat in linux
Running tomcat in linux
Error starting Tomcat in Ubuntu
How to install and Run jsf on a Linux machine
IntelliJ Java IDE