This is an ubber ubber short install guide we came up with to get Glassfish on a virtual server for testing:
Make sure you have at least 512 memory free!
1.) Install java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
2.) Get GlassFish ZIP file
http://glassfish.java.net/downloads/3.1.1-final.html
unzip the file into /opt
3.) Follow this to start your domain.
http://docs.oracle.com/cd/E26576_01/doc.312/e24937/basic-features.htm#gixue
4.) Once you’ve started the domain:
http://YourServer:8080/
Admin Console
http://YourServer:4848
To Setup as service:
(Borrowed from Here: https://blogs.oracle.com/foo/entry/how_to_run_glassfish_v3)
Save following as “glassfish” in the /etc/init.d/
chmod +x glassfish
update-rc.d glassfish defaults
#!/bin/sh
#
# glassfish init script for Linux
# Simplest possible case -- no password file, one default domain
# it would be simple to add such options
GLASSFISH_HOME=${GLASSFISH_HOME:-"/opt/glassfishv3/glassfish"}
case "$1" in
start)
$GLASSFISH_HOME/bin/asadmin start-domain >/dev/null
;;
stop)
$GLASSFISH_HOME/bin/asadmin stop-domain >/dev/null
;;
restart)
$GLASSFISH_HOME/bin/asadmin restart-domain >/dev/null
;;
\*)
echo "usage: $0 (start|stop|restart|help)"
esac