SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Now, if I login as root and type "/etc/rc.d/rc.tomcat start" from the command line, Tomcat starts just fine. So I guess my script is okay. If I copy/paste the code piece inside rc.M into a temporary file and execute it, Tomcat starts fine. So why doesn't Tomcat startup automatically when I first boot the machine? What else do I need to do?
Is there a log file somewhere that I can look at? Nothing in /apache-tomcat-5.5.17/logs seems to be helpful.
I had the export statements in /etc/profile, but I guess that must be read after /etc/rc.d/rc.M, because moving the export statements to rc.M just prior to calling /etc/rc.d/rc.tomcat did the trick.
Maybe this is basic stuff to you folks, but I don't know how I would hae figured it out as a newbie without you. Thanks!
I have installed Tomcat (following Marty Hall's excellent guide) and everything works fine.
My question is in relation to the startup.sh and catalina.sh files. Why do I need to be root user to start Tomcat? Is there a way to allow the local user to do this?
The only thing I've spotted is that the file tomcat-users.xml is root:root - all else is localuser:users.
So my problem is that I have to su - root each time I need to control the server.
My tomcat user is a regular user, but for other users in the tomcat group I had to run the following so they could write to the Tomcat directories:
Code:
find /usr/local/apache-tomcat-5.5.17 -type d -exec chmod -c g+ws {} \;
That gave write permissions to the tomcat group to all Tomcat directories as well as making sure the group ownership of files stays at tomcat. My install is for dev/testing so I let the users write to config files, libs, etc. as well as the webapps directory. Nobody but the administrator has rights to the acceptance test and production boxes...
I got which i wrote for my tomcat version 5.0.27 using jsdk 1.4.2 to startup in /etc/init.d but i have some problem with it. Is there any kind soul who can me here. thanks amillion in advance.
Code:
#!/bin/bash
#
# Source function library.
. /etc/rc.d/init.d/functions
export JAVA_HOME=/opt/j2sdk
export CLASSPATH=.:/opt/j2sdk/lib/tools.jar:/opt/j2sdk/lib/rt.jar
export PATH=/opt/j2sdk/bin:/j2sdk/bin:$PATH
RETVAL=$?
JAVA_OPTS="-Xincgc -Xms64m -Xmx512m"
SITE_ROOT="/opt/tomcat"
SITES='ls ${SITE_ROOT}
case "$1" in
start)
for x in ${SITES}
do
CATALINA_BASE="${SITE_ROOT}/${x}/tomcat"
if [ -f $CATALINA_BASE/bin/startup.sh];
then
echo "Starting Server: ${x}"
JAVA_OPTS="${JAVA_OPTS}"
$CATALINA_BASE/bin/startup.sh
fi
done
;;
stop)
for x in ${SITES}
do
CATALINA_BASE="${SITE_ROOT}/${x}/tomcat"
if [ -f $CATALINA_BASE/bin/shutdown.sh];
then
echo "Shutting down Server: ${x}"
$CATALINA_BASE/bin/shutdown.sh
fi
done
;;
*)
echo $"Usage: $0 {start|stop}"
exit 1
;;
esac
exit $RETVAL
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.