Wednesday, December 19, 2007

How to install GlashFish Server on linux?

Installing GlassFish Server on Linux

1)    Install JDK on a system and set JAVA_HOME environmental variable.

       If you don't have GlassFish server, U can download GlassFish Server from following location.

2)    Run:

       java -Xmx256m -jar filename.jar

      This will extract jar file and create a new directory structure rooted under a directory named 'glassfish'.   

3)    cd glassfish

       Change Directory to GlassFish.

4)    If you are using a machine with an operating system that is a derivative of UNIX(tm), set the execute permission for the Ant binaries that are included with the GlassFish bundle.

      chmod -R +x lib/ant/bin
       lib/ant/bin/ant -f setup.xml

      OR for Windows:

      lib\ant\bin\ant -f setup.xml

5)     Start the server using the asadmin command. For that be maybe you first have to change the current directory to /glassfish/bin.

6)    next start the database

      asadmin> start-database

7)   and finally you can start the server...
       asadmin> start-domain domain1
      You can access your default page at


8) The server is now up and running. You can log into the web admin interface by the following url:


Login as Admin - userid="admin", password ="adminadmin"