0
JSVC를 사용하지 않고 루트 사용자 (openam이라고하는 특정 사용자를 만들었습니다)를 사용하지 않고 재부팅 할 때 Tomcat을 자동으로 시작하는 가장 빠른 방법은 어느 것입니까? 내가 누구 intereset를 들어를 CentOS 6다른 사용자가 재부팅 할 때 Tomcat을 시작하십시오
JSVC를 사용하지 않고 루트 사용자 (openam이라고하는 특정 사용자를 만들었습니다)를 사용하지 않고 재부팅 할 때 Tomcat을 자동으로 시작하는 가장 빠른 방법은 어느 것입니까? 내가 누구 intereset를 들어를 CentOS 6다른 사용자가 재부팅 할 때 Tomcat을 시작하십시오
를 실행하는거야, 나는
#!/bin/sh
# Purpose: Start or stop the Tomcat service.
# chkconfig: 345 95 5
# Check the path of Tomcat and set enviorment variables as follows in the .bashrc profile
export CATALINA_HOME="/path/tomcat"
export CATALINA_BASE="/path/tomcat"
JAVA_HOME="/usr/java/jdk1.8.0_131"
export JAVA_HOME
case $1 in
start)
su user -c /path/tomcat/bin/startup.sh
;;
stop)
su user -c /path/bin/shutdown.sh
;;
restart)
su user -c /path/tomcat/bin/shutdown.sh
su user -c /path/tomcat/bin/startup.sh
;;
esac
exit 0
user
이 시작 사용자입니다 /etc/init.t/tomcat
chkconfig --add tomcat