Installing Glassfish from the Command Line
Get JDK (Java SE Development Kit) 6 or higher from http://java.sun.com/javase/, if you are using Solaris, Linux, or Windows.
1. Download the GlassFish v2 distribution https://glassfish.dev.java.net/public/downloadsindex.html.
2. Set the environment variable JAVA_HOME to point to the directory in which JDK 6 is installed.
3. Run the following command:
java -Xmx256m -jar .jar
4. Set ANT_HOME to point to the ant 1.6.5 installation, which is at /glassfish/lib/ant directory.
5. Navigate to the glassfish directory:
cd glassfish
6. If you do not want clustering capabilities, run the following command:
ant -f setup.xml
If you want to use GlassFish with clustering, change the command to:
ant -f setup-cluster.xml
7. When the ant build was succesfull go to the /bin directory and start Glassfish with the command:
asadmin start-domain domain1
8. Open your webbrowser and go to:
http://localhost:4848
9. In the admin console login enter username: admin, and password: adminadmin
10. You are now ready to configure the application server and deploy applications.

Comments are closed.