tried to get tomcat to work

Discussion in 'Mac Programming' started by caustic, Jul 11, 2008.

  1. caustic macrumors newbie

    Jul 8, 2008
    hi there
    i am using osx 10.4.11 with a mac mini power g4.
    i followed the instructions to get tomcat running from :

    i have it installed
    the problem is getting to startup. as per the instructions of:

    Now you’ll probably want to change ownership of all the Tomcat files and directories to someone other than the administrator. Since I use the login “liz” on my system, I’m changing ownership of all files under jakarta-tomcat-4.0.1/ to “liz”.

    i understand what this means but i think this is part of my problem. so how do i apply this line for my machine:
    root@localhost:local> chown -R liz:staff /usr/local/jakarta-tomcat-4.0.1

    how do i find out what i should use based on my machine? this is for liz:staff
    i am no unix god so this is the first confusion. where do i get this info for my machine?

    next up is when i create the startup and shutdown scripts of:
    export CATALINA_HOME=/usr/local/jakarta-tomcat-4.0.1
    export JAVA_HOME=/usr

    export CATALINA_HOME=/usr/local/jakarta-tomcat-4.0.1
    export JAVA_HOME=/usr

    these are located under my home directory ($HOME) with a bin folder created. the contents of this bin directory with permissions are:

    -rwxr-xr-- 1 me me 115 Jul 11 16:33 start_tomcat
    -rwxr-xr-- 1 me me 116 Jul 11 16:35 stop_tomcat

    you can see them have successfully set to execute. when i tried to run i get:

    -bash: start_tomcat: command not found

    i know this is another dumb problem, i would like to know to resolve this one as well.

    best yet is when i look at the contents of /usr/local/apache-tomcat-5.5.26/bin
    i get:

    -rw-r--r-- 1 root wheel 24093 Jan 28 15:38 bootstrap.jar
    -rw-r--r-- 1 root wheel 1880 Jan 28 15:38 catalina-tasks.xml
    -rwxrwxrwx 1 root wheel 9134 Jan 28 15:38 catalina.bat
    -rwxrwxrwx 1 root wheel 12128 Jan 28 15:38
    -rw-r--r-- 1 root wheel 9341 Jan 28 15:38 commons-daemon.jar
    -rw-r--r-- 1 root wheel 52313 Jan 28 15:38 commons-logging-api-1.1.1.jar
    -rwxrwxrwx 1 root wheel 509 Jan 28 15:38 cpappend.bat
    -rwxrwxrwx 1 root wheel 1282 Jan 28 15:38 digest.bat
    -rwxrwxrwx 1 root wheel 841 Jan 28 15:38
    -rw-r--r-- 1 root wheel 1743 Jan 28 15:38 jkstatus-tasks.xml
    -rw-r--r-- 1 root wheel 2167 Jan 28 15:38 jmxaccessor-tasks.xml
    -rw-r--r-- 1 root wheel 74398 Jan 28 15:38 jsvc.tar.gz
    -rwxrwxrwx 1 root wheel 4260 Jan 28 15:38 service.bat
    -rwxrwxrwx 1 root wheel 2413 Jan 28 15:38 setclasspath.bat
    -rwxrwxrwx 1 root wheel 3008 Jan 28 15:38
    -rwxrwxrwx 1 root wheel 1271 Jan 28 15:38 shutdown.bat
    -rwxrwxrwx 1 root wheel 780 Jan 28 15:38
    -rwxrwxrwx 1 root wheel 1272 Jan 28 15:38 startup.bat
    -rwxrwxrwx 1 root wheel 1173 Jan 28 15:38
    -rw-r--r-- 1 root wheel 13017 Jan 28 15:38 tomcat-juli.jar
    -rw-r--r-- 1 root wheel 187968 Jan 28 15:38 tomcat-native.tar.gz
    -rw-r--r-- 1 root wheel 57344 Jan 28 15:40 tomcat5.exe
    -rw-r--r-- 1 root wheel 98304 Jan 28 15:40 tomcat5w.exe
    -rwxrwxrwx 1 root wheel 2233 Jan 28 15:38 tool-wrapper.bat
    -rwxrwxrwx 1 root wheel 2545 Jan 28 15:38
    -rwxrwxrwx 1 root wheel 1278 Jan 28 15:38 version.bat
    -rwxrwxrwx 1 root wheel 784 Jan 28 15:38

    i set all *.sh and *.bat files as shown to executable (just trying to get working!!). when i run i get:
    -bash: command not found

    --> another dumb question, why is this for all you unix experts? i get the same result trying to run startup.bat

    please help. what am i doing wrong. i know it should be easy but i have tried everything even i am no where that knowledgable under unix
    big thanks
  2. sord macrumors 6502

    Jun 16, 2004
    chown -R liz:staff /usr/local/apache-tomcat-5.5.26

    Change jakarta-tomcat-4.0.1 to apache-tomcat-5.5.26 in those files. And change JAVA_HOME to /System/Library/Frameworks/JavaVM.framework/Home

    On UNIX systems, you cannot type a command unless it is in the path, or you give it a path. This means if you have 'cd'd to the directory with start_tomcat, you need to execute it with a ./ prefix (i.e. ./start_tomcat)

    Same as above

    .bat files are DOS/Windows scripts, and are not valid on non-DOS/non-Windows machines. Tomcat includes them because Windows won't accept .sh files.

Share This Page