Thanks. I will take a look at it. BaTien
On Tue, 2005-08-16 at 20:31 +0100, Darryl L. Miles wrote: > Duong BaTien wrote: > > >I set tomcat 5.5.9 running in port 8080 so it can be started without > >using the root user. However, when I start tomcat using linux rc.local > >at system start up (/apps/tomcat-5/bin/startup.sh), it seems that the > >tomcat instance is started under root. > > > >Question: Where do i set the user that starts tomcat instance via Redhat > > > > > >Fedora Core start up? > > > > > > READ: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/setup.html > > Check out the "-user <username>" argument to "jsvc" which may not be so > well documented. > > > For non-root running check out "jsvc" bundled with Tomcat: > > Extracted TC to /opt/jakarta-tomcat-5.5.9 > > # To run it as java service need to build jsvc > cd $CATALINA_HOME/bin > tar -zxvf jsvc.tar.gz > cd jsvc-src > autoconf > JAVA_HOME="/opt/jdk1.5.0_04" > export JAVA_HOME > sh ./configure > make > cp jsvc .. > cd .. > > # Create a system user for tomcat > /usr/sbin/groupadd -g 155 jakarta > /usr/sbin/useradd -u 155 -g jakarta -s /sbin/nologin jakarta > > # Fix all the permissions on the $CATALINA_HOME with > chown jakarta. -R $CATALINA_HOME > > # This bit below you can put into your own startup script for TC and > call each time > JAVA_HOME="/opt/jdk1.5.0_04" > export JAVA_HOME > PATH="$JAVA_HOME/bin:$PATH" > export PATH > > CATALINA_HOME=/opt/jakarta-tomcat-5.5.9 > export CATALINA_HOME > > cd $CATALINA_HOME > ./bin/jsvc -Djava.endorsed.dirs=./common/endorsed -cp > ./bin/bootstrap.jar \ > -outfile ./logs/catalina.out -errfile ./logs/catalina.err \ > -pidfile "./logs/jsvc.pid" \ > -user jakarta \ > org.apache.catalina.startup.Bootstrap > > > > > > Maybe you create a script in /etc/init.d/mytomcat that works the same > way at the others in there ? Then symlink from each useful runlevel > /etc/rc.d/rc[345].d/mytomcat -> /etc/initd.d/mytomcat, use > /sbin/runlevel to see which you are at already. > > Maybe you are lazy and simply add a few lines to /etc/rc.local ? > > > Eitherway should do the trick. > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]