glashfish redhat enterprise 5.5 시작

================glassfish.sh=====================
#!/bin/sh
#
# glasshfish    Startup script for the glassfish server
#
#
# processname: glassfish
#
 
# Source function library
. /etc/rc.d/init.d/functions
 
if [ -f /etc/sysconfig/glassfish ]; then
        . /etc/sysconfig/glassfish
fi
 
if [ -z "$GLASSFISH_DOMAIN" ]; then
        GLASSFISH_DOMAIN="domain1"
fi
 
prog="glassfish"
glassfish="/usr/web/glassfish/bin/asadmin"
RETVAL=0
 
start() {
        echo -n $"Starting $prog: "
        daemon $glassfish start-domain $GLASSFISH_DOMAIN
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
        return $RETVAL
}
 
stop() {
        echo -n $"Stopping $prog: "
        daemon $glassfish stop-domain $GLASSFISH_DOMAIN
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
        return $RETVAL
}
 
 
case "$1" in
        start)
                start
                ;;
        stop)
                stop
                ;;
        restart)
                stop
                start
                ;;
        *)
                echo $"Usage: $0 {start|stop|restart}"
                RETVAL=1
esac
 
exit $RETVAL 

1. glasfish 명령 을 시작 합 니 다. / sadmin start - domain 1 (서비스 시작)
2. 시동 걸 기
 
 
chmod 755 glassfish.sh
chown root:root glassfish.sh
mv glassfish.sh /etc/init.d/glassfish
service glassfish start
 
 

좋은 웹페이지 즐겨찾기