Glassfish Installation On Ubuntu Hardy

Since one of my responsibility at work is being pre-sales for Sun Identity Manager software, I need a demo environment ready in my laptop for proof-of-concept, presentation, demonstration, and testing purposes. Early on I usually use Tomcat Application Server to host the application. But being a Sun partner, wouldn’t it be nice if the apps is deployed on Sun Apps Server as well? :D. With the new Identity Manager version 8.0 coming to the market, I decided to set it up on Sun Apps Server, known as Glassfish.

So here goes.

  • Install Sun Java JDK

There are two alternatives for Java in ubuntu, i.e. OpenJDK and Sun Java JDK. In this environment I’m going to use Sun Java JDK.

$sudo apt-get install sun-java6-jdk

Having OpenJDK installed previously, we need to update the system to use the new JDK
$sudo update-alternatives --config java

  • Install Glassfish Application Server

$sudo apt-get install glasshfishv2

By default, apt installs the apps server into /usr/share/glasshfishv2/ directory, and the web application folder goes to /var/lib/glassfishv2.

  • Start the application server

$/usr/share/glassfishv2/bin/asadmin start-domain
.: 7: Can't open /usr/share/glassfishv2/config/asenv.conf

Now this is weird. I check the /usr/share/glasshfishv2/ and there is no config/ directory in the folder.
For some weird reason, apt seem to forget to configure the application server (or maybe I do something wrong?). After I installed it, i didn’t check the installation, and shutdown my laptop immediately since I need to do something else. Only after I boot my laptop and trying to configure it, I noticed that there are something wrong.

Since this is my first time using Glasshfish, I really don’t know my way around :D. Ask Google, and all references failed. Trying dpkg-reconfigure, failed as well. Being lazy as I am, I took the shortcut, reinstall the damn thing :D
$sudo apt-get install --reinstall glassfishv2

Finally, there it is. I finally get it right. Fire up my browser and browse to http://localhost:4848/ the admin page appears.

Tags: , ,

I’ve wrote a tutorial about how to install Glassfish application server from installation file downloaded from the glassfish official server. May it can support this article. Thanks.. - http://satriapermana.net/2008/12/05/glassfish-java-application-server/ -