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.- First you need to download the installer file from the glassfish website https://glassfish.dev.java.net/downloads/v2-b58g.html
which was glassfish-installer-v2-b58g.jar at the time of writing.
- 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
ENTER PASSWORD
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
GLASSFISHPATH=/usr/local/glassfish/bin
case ”$1” in
start)
${GLASSFISHPATH}/asadmin start-domain domain1
;;
stop)
${GLASSFISHPATH}/asadmin stop-domain domain1
;;
restart)
${GLASSFISHPATH}/asadmin stop-domain domain1
${GLASSFISHPATH}/asadmin start-domain domain1
;;
*)
echo $”usage: $0 {start|stop|restart}”
exit 1
esac
- 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
Andrew Spooner
Please wait - comments are loading

Loading…

