• domingo, septiembre 22nd, 2013
1.- Crear archivo tomcat en la ruta /etc/rc.d/init.d
#!/bin/bash
#
# Iniciación automatica de TOMCAT6D
#
# chkconfig: – 55 25
# description: Demonio de iniciación TOMCAT7D 7.0.29
#
# processname: tomcat7d
# pidfile: /var/run/tomcat7d.pid
#export JAVA_HOME=/usr/java/jdk1.6.0_20
export CATALINA_HOME=/var/apache-tomcat-7.0.29
start(){
echo «Iniciando Tomcat7»
$CATALINA_HOME/bin/startup.sh
}
stop() {
echo «Deteniendo Tomcat7»
$CATALINA_HOME/bin/shutdown.sh
}
restart(){
stop
start
}
# See how we were called.
case $1 in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo «Utilice los Parámetros: $0 {start|stop|restart}»
exit 1
esac
exit 0
2.- Darle permisos de ejecución
3.- chkconfig –add tomcat
4.- chkconfig tomcat on
Category: Uncategorized
|