Missing from the glassfishv2 package
Nitya Doraisamy
Nitya.Doraisamy at Sun.COM
Sat May 3 01:37:05 BST 2008
Aaron
Thanks for taking the time to provide this data. A fix is in process
in the upstream source for GlassFish v2
(https://bugs.launchpad.net/ubuntu/+source/glassfishv2/+bug/223898)
which is causing the install failure on open6.
We are hoping to get this ready in the next week. I will take a look
at the init scripts and update/incorporate them into the package as soon
as I can.
Thanks
Nitya
Aaron J. Zirbes wrote:
> Upon trying to setup a Glassfish v2 server on Ubuntu 8.04 Server from a base install I ran into the
> following issues.
>
> 1.) Package 'glassfishv2' should require package 'sun-java6-jdk' or 'sun-java5-jdk'
> Without either of these package, the install process fails.
>
> 2.) As with any server, it should be able to start at boot. To solve this, the following files need
> to be added to the distribution (or variants thereof)
>
> 2a.) /etc/default/glassfishv2
>
> # Default settings for glassfishv2. This file is sourced by /bin/sh from
> # /etc/init.d/glassfishv2.
>
> # Location of glassfish
> GLASSFISH_HOME=/usr/share/glassfishv2
>
> # Name of admin user
> ADMIN_USER=admin
>
> # Location of Glassfish Domains
> GF_DOMAIN_DIR=/var/lib/glassfishv2/domains
>
> # Location of auto-start passwords
> ADMIN_PASSWORD_FILE=$GLASSFISH_HOME/config/install/default/passwordfile
>
> # Name of domain to startup
> DEFAULT_DOMAIN=domain1
>
> 2b.) /etc/init.d/glassfishv2
> #! /bin/sh
>
> ### BEGIN INIT INFO
> # Provides: glassfishv2
> # Required-Start: $network $local_fs $remote_fs
> # Required-Stop:
> # Default-Start: 2 3 4 5
> # Default-Stop: 0 1 6
> # Short-Description: Sun's Java Application Server
> ### END INIT INFO
>
> set -e
>
> # /etc/init.d/glassfishv2: start and stop the Sun Glassfish v2.0 server
>
> # Default Glassfish Install base
> GLASSFISH_HOME=/usr/share/glassfishv2
>
> test -x $GLASSFISH_HOME/bin/asadmin || exit 0
>
> if test -f /etc/default/glassfishv2; then
> . /etc/default/glassfishv2
> fi
>
> . /lib/lsb/init-functions
>
> # Are we running from init?
> run_by_init() {
> ([ "$previous" ] && [ "$runlevel" ]) || [ "$runlevel" = S ]
> }
>
> export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
>
> case "$1" in
> start)
> log_daemon_msg "Starting Glassfish v2 server" "glassfishv2"
> if $GLASSFISH_HOME/bin/asadmin start-domain \
> --terse=true --interactive=false --user $ADMIN_USER \
> --passwordfile $ADMIN_PASSWORD_FILE \
> --domaindir $GF_DOMAIN_DIR $DEFAULT_DOMAIN; then
> log_end_msg 0
> else
> log_end_msg 1
> fi
> ;;
> stop)
> log_daemon_msg "Stopping Glassfish v2 server" "glassfishv2"
> if $GLASSFISH_HOME/bin/asadmin stop-domain \
> --terse=true \
> --domaindir $GF_DOMAIN_DIR $domain; then
> log_end_msg 0
> else
> log_end_msg 1
> fi
>
> restart)
> $0 stop
> sleep 2
> $0 start
> ;;
>
> *)
> log_action_msg "Usage: /etc/init.d/glassfishv2 {start|stop|restart}"
> exit 1
> esac
>
> exit 0
>
> 2c.) The init.d rc2 link needs to be created
> cd /etc/rc2.d
>
> sudo ln -s ../init.d/glassfishv2 S80glassfishv2
>
>
>
> NOTE: These scripts work for me, but someone with more init experience should look them over.
>
> --
> Aaron J. Zirbes
> Environmental Health Sciences
> University of Minnesota
>
>
More information about the Ubuntu-motu
mailing list