Perform the following to maintain GlassFish server:
/<glassfish>/domains/domain1/logs directory. The main log is the server.log file.The asadmin utility is located in /<glassfish>/bin. You can use this utility to perform the following:
bin/asadmin stop-domain domain1ulimit -n 32768
bin/asadmin start-domain domain1Or, you can create an initialization script (see The glassfish.sh Script):
/etc/rc.d/init.d/glassfish.shchmod +x /etc/rc.d/init.d/glassfish
chkconfig --add glassfishservice command as follows:
service glassfish stop
service glassfish startNote: If you installed GlassFish anywhere other than /usr/local/glassfish, you must change the following line in the GlassFish script to the location in which you installed the application:
ASADMIN=/usr/local/glassfish/bin/asadmin
#! /bin/sh
# chkconfig: 2345 99 01
# description: GlassFish App Server
set -e
# Increase file descriptor limit
ulimit -n 32768
ASADMIN=/usr/local/glassfish/bin/asadmin
case "$1" in
start)
echo -n "Starting GlassFish server: glassfish"
$ASADMIN start-domain domain1
echo "."
;;
stop)
echo -n "Stopping GlassFish server: glassfish"
$ASADMIN stop-domain domain1
echo "."
;;
*)
echo "Usage: /etc/init.d/glassfish {start|stop}"
exit 1
esac
exit 0