Installation glassfish on Ubuntu server

Asked by Clayton Freitas on 2009-04-02

I'm installed glassfish on ubuntu server (apt-get install glassfishv2). After install the web console starts and the server is up. The program create the directory /var/lib/glassfish and /usr/share/glassfish. When I run the asadmin the system try to create a new domain in other directory. What's happened? Why the program don't use the actually domain?


Question information

English Edit question
Ubuntu glassfishv2 Edit question
No assignee Edit question
Solved by:
Craig Huffstetler
Last query:
Last reply:
Best Craig Huffstetler (xq) said : #1

This is a great guide on Glassfish:

I would check that out, as well as go to the administrator's console in your browser as referenced (on the port referenced), and setup your current domain. You can remove whatever else you set. Just restart the init.d script and/or restart.

This should resolve any problems you are facing and you can also set the directories as you see fit within the configuration file referenced in the above blog as well as in the administrator's console if Glassfish is already started as a daemon.


Script to run after install:
sudo -u glassfish bin/asadmin start-domain domain1

How to get the console for administration:
L: admin
P: adminadmin
Unless you've changed this when you installed Glassfish

Clayton Freitas (clayton-mc) said : #2

thanks for your answer. What do you think about install glassfish with the command apt-get install glassfishv2? I don't find a good documentation about this method.

Clayton Freitas (clayton-mc) said : #3

I have not changed any configuration and my ubuntu server version is 8.10. Completing the ask in the last message, I don't know if the installation with apt-get on Ubuntu is better or not of the download the software from Sun.

Mohamed Zaian (mzaian) said : #4

installation using apt-get is better for integration with the system and also it will download all the dependencies for the application, try to purge your manual installation and use apt-get

Clayton Freitas (clayton-mc) said : #5

Hi guys! thanks for answers. My problem was resolved.

1) when installed glassfishv2 with apt-get the domain1 is created and thats ok. after that I started the program executing /usr/bin/asadmin and the software created a new directory. To resolve this problem I edit the asadmin "vi /usr/bin/asadmin" and change the GF_DOMAIN_DIR to my initial domain.

2) Installing glassfish without apt-get I thinked this method better and recommend the site commented by Craig Huffstetler.



Clayton Freitas (clayton-mc) said : #6

Thanks Craig Huffstetler, that solved my question.