All 1 entries tagged Glassfish

No other Warwick Blogs use the tag Glassfish on entries | View entries tagged Glassfish at Technorati | There are no images tagged Glassfish on this blog

November 14, 2007

Glassfish on Ubuntu.. howto

EDIT: It has come to my attention that this starts glassfish with root privileges which wouldn’t be good if this wasn’t a test server! A alternative (and better method) can be found at link cheers Jasper.

One of my colleagues has a java based webpage that he is developing and we have been testing different hosting software… finally settling on Glassfish. I was searching the web for an easy howto and there doesn’t seem to be one so I have written my findings here.
  • Next you need to decide where you want to install it… Personally, I like programs to be installed into /usr/local/appname. So you will need to copy the install.jar to /usr/local (the jar will extract files into a glassfish folder).
  • Next you follow the steps on the webpage above… so basically…

sudo -s
java -Xmx256m -jar glassfish-installer-v2-b58g.jar
cd glassfish
chmod -R +x lib/ant/bin
lib/ant/bin/ant -f setup.xml

  • Next you can either start it with the command

/usr/local/glassfish/bin/asadmin start-domain domain1

  • Or better create a init.d file to start and stop it…

gedit /etc/init.d/glassfish

case ”$1” in
${GLASSFISHPATH}/asadmin start-domain domain1
${GLASSFISHPATH}/asadmin stop-domain domain1
${GLASSFISHPATH}/asadmin stop-domain domain1
${GLASSFISHPATH}/asadmin start-domain domain1
echo $”usage: $0 {start|stop|restart}”
exit 1

  • save and exit
  • chmod a+x /etc/init.d/glassfish
  • to have glassfish start during boot (and stop during halt)

ln -s /etc/init.d/glassfish /etc/rc1.d/K99glassfish
ln -s /etc/init.d/glassfish /etc/rc2.d/S99glassfish

Well, its not a great howto but then the install was pretty simple

January 2022

Mo Tu We Th Fr Sa Su
Dec |  Today  |
               1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

Search this blog



Most recent comments

  • Thanks for the tutorial. It was very helpful. I made some improvements and additions and wrote about… by Jasper on this entry
  • Oh, and to check that your init.d script works you can just try: – sudo /etc/init.d/glassfish stop T… by on this entry
  • A quickway to find out if it was running would be to use your web browser and locate the home page w… by on this entry
  • Andrew, I worked it out. I did not have the JDK 6 installed (I only installed J2EE 5 w/o the JDK). B… by Chris on this entry
  • Andrew, A great article and right on time! I recently installed Glassfish v2 on Ubuntu 7.10 but when… by Chris on this entry

Blog archive

RSS2.0 Atom
Not signed in
Sign in

Powered by BlogBuilder