PDA

View Full Version : apache tomcat not starting




chrislee8
Jun 18, 2006, 03:08 PM
I got the lestest tomcat and extracted it /developer/application folder.

I tried to run startup.bat, but it says permission denied. i am the user who starts(bought and run installation) this machine. I don't know why I don't have permission to run some files.

Can anyone tell me how to debug and fix this problem? Thanks



robbieduncan
Jun 18, 2006, 03:29 PM
Is the file executable? Open the Terminal and do an ls -l on the file. If there are no x characters in the permissions then it's not executable.

chrislee8
Jun 18, 2006, 04:04 PM
on startup.bat, it is -rw-r--r--

on startup.sh, it is -rwxr-xr-x

let me understand something, after the installation(extract and move to appropriate location), I should run startup.bat to start Tomcat. How can it be not permitted to be run?

plinden
Jun 18, 2006, 04:42 PM
startup.bat is for Windows, startup.sh is for *nix systems, OS X included.

chrislee8
Jun 18, 2006, 08:05 PM
ok, in terminal, i run startup.sh. It comes back:

-bash: startup.sh: command not found.

plinden
Jun 18, 2006, 11:44 PM
ok, in terminal, i run startup.sh. It comes back:

-bash: startup.sh: command not found.
Type "./startup.sh"

In *nix, your current working directory (denoted by ".") is not in your path by default (unless you add it in .bash_profile). Adding it to the path isn't recommended though. It's omitted for good security reasons. For instance, if I create a script and call it "ls", and get it somehow into your home directory, I can get you to run the script every time you type "ls" while you're in your home directory. But if "." is not in your path, the *nix command "ls" is run since *nix won't look for executables in your current working directory.

Edit: I forgot to mention, if you absolutely must add "." to your path, do it at the end, i.e. "export PATH=$PATH:.". That way, the current working directory is the last place *nix will look for executables. And definitely don't add to the path of an admin account or root if you have it enabled.

chrislee8
Jun 19, 2006, 12:44 PM
Type "./startup.sh"

In *nix, your current working directory (denoted by ".") is not in your path by default (unless you add it in .bash_profile). Adding it to the path isn't recommended though. It's omitted for good security reasons. For instance, if I create a script and call it "ls", and get it somehow into your home directory, I can get you to run the script every time you type "ls" while you're in your home directory. But if "." is not in your path, the *nix command "ls" is run since *nix won't look for executables in your current working directory.

Edit: I forgot to mention, if you absolutely must add "." to your path, do it at the end, i.e. "export PATH=$PATH:.". That way, the current working directory is the last place *nix will look for executables. And definitely don't add to the path of an admin account or root if you have it enabled.

it works, thank you.

how do i start tomcat as a service? I will look into the manual, but what the hell, i will appreciate any quick answer.

thanks

plinden
Jun 19, 2006, 02:05 PM
I haven't done it on OS X - I usually use chkconfig in Linux - but this page describes how to add Tomcat and Apache as StartupItems: http://www.macdevcenter.com/pub/a/mac/2003/10/21/startup.html

It's from 2003, but shouldn't have changed much since then.