How to Install Glassfish on Linux 5

Posted by Randika on March 30, 2009

Before start the installation, verify the availability of java in your linux node.

$ java -version
java version "1.6.0_0"
IcedTea6 1.3.1 (6b12-Fedora-10) Runtime Environment (build 1.6.0_0-b12)
OpenJDK Client VM (build 1.6.0_0-b12, mixed mode)

Now you need the latest version of Glassfish application server, I’m using Glassfish V2 for Linux for this installation. I’m going to download this file to /opt dir.

$ lwp-download http://java.net/download/javaee5/v2ur2/promoted/Linux/glassfish-installer-v2ur2-b04-linux.jar

once finished, execute

$ java -Xmx256m -jar glassfish-installer-v2ur2-b04-linux.jar

Files will be decompressed in a directory named /opt/glassfish

switch to glassfish dir and type

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

Ok, its almost done. Let’s start the server now.

$ bin/asadmin start-domain

Now type http://localhost:8080 and see it’s working. you can reach to the admin console http://localhost:4848 here with default username/password. (admin/adminadmin)

hope this helps some one.