# sudo -s
# aptitude update
# aptitude install sun-java6-jdk wget unzip
# cd /opt
# wget http://download.java.net/glassfish/v3/release/glassfish-v3.zip
# unzip glassfish-v3.zip
# useradd –system glassfish -d /opt/glassfishv3
# sudo chgrp -R admin /opt/glassfishv3-prelude
# sudo chown -R glassfish /opt/glassfishv3-prelude
# sudo chmod -R +x /opt/glassfishv3/bin/
# sudo chmod -R +x /opt/glassfishv3/glassfish/bin/
# /opt/glassfishv3/bin/asadmin start-domain domain1
- # vi /etc/init.d/glassfish
- past the following into the file:
#! /bin/sh
GLASSFISHHOME=/opt/glassfishv3
case “$1” in
start)
${GLASSFISHHOME}/bin/asadmin start-domain domain1
;;
stop)
${GLASSFISHHOME}/bin/asadmin stop-domain domain1
;;
restart)
${GLASSFISHHOME}/bin/asadmin stop-domain domain1
${GLASSFISHHOME}/bin/asadmin start-domain domain1
;;
*)
echo $”usage: $0 {start|stop|restart}”
exit 1
esac
- edit the file to suit and save
- set permissions and use update-rc.d to ensure its run at system start/stop:
# chmod a+x /etc/init.d/glassfish
# update-rc.d /etc/init.d/glassfish defaults
According to the glassfish website the minimum required version of the Java SDK is 1.6.0_15 on MacOSX & 1.6.0_17 on everything else, whereas the version on Karmic seems to be 1.6.0_15-b03. Have you not noticed any problems because of this?
Anyway, thanks for sharing the instructions!
LikeLike
Hi Dominic:
I haven't had any issues so far.
Dennis
LikeLike
okay, I just followed your instructions (thanks again!), and found a few small mistakes…
there are a couple of presumably old references to 'glassfishv3-prelude' — removing the '-prelude' fixed that.
and this line:
update-rc.d /etc/init.d/glassfish defaults
should be (I believe):
update-rc.d glassfish defaults
also, the result of the wget was not simply 'glassfish-v3', but also contained a '?' followed by some URL attributes. I guess a wget -o 'glassfish-v3' would fix that.
Anyway, thank you.
LikeLike
okay, I just followed your instructions (thanks again!), and found a few small mistakes…
there are a couple of presumably old references to 'glassfishv3-prelude' — removing the '-prelude' fixed that.
and this line:
update-rc.d /etc/init.d/glassfish defaults
should be (I believe):
update-rc.d glassfish defaults
also, the result of the wget download was not simply named 'glassfish-v3', but also contained a '?' followed by some URL attributes. I guess a wget -o 'glassfish-v3' would fix that.
Anyway, thank you for saving me loads of time.
LikeLike