Install the Oracle GlassFish Server on Linux

IXIASOFT provides an answer file that you can use to install the GlassFish Server on Linux.

To install the Oracle GlassFish Server on Linux:
Note: You must have root privileges to run this procedure.
  1. Go to the following URL:
  2. Select Click here to download Oracle GlassFish Server (3.1.2.x).
    Where 3.1.2.x is the latest version available (for example,, as shown below:
    Note: Do not select the Web Profile version of the Oracle GlassFish Server.
    GlassFish Server download
  3. Select Accept License Agreement.
  4. Select the Linux/Unix/Mac Installer download (for example,
  5. Log in to the CMS Application Server as user root.
  6. Copy the glassfish/answer.txt file provided by IXIASOFT to the directory where you downloaded the GlassFish installer.
  7. Open the answer.txt file and make sure that the following fields are set correctly:
    • Domain.Configuration.ADMIN_USER, Domain.Configuration.ADMIN_PASSWORD, and Domain.Configuration.ADMIN_PASSWORD_REENTER: Set to the name and password of the user accessing the GlassFish Administration Console.
    • Set to the directory where the GlassFish software will be installed.
    • and Set to the location of the JDK.
  8. From the directory where the answer.txt file is located, run the following command:
    sh ogs-<3.1.2.x> -j "<java>" -a answer.txt -s
    • <3.1.2.x> is the GlassFish version
    • <java> is the location of the JDK on the machine
      Important: This must be the JDK, not the JRE.
    For example:
    sh -j /usr/java/jdk1.7.0_51/ -a answer.txt -s

    The Oracle GlassFish Server is installed.

  9. Copy the glassfish/glassfish.cmsappserver file provided by IXIASOFT to the /etc/init.d directory.
  10. To make the file executable, enter chmod a+x filename:
    chmod a+x /etc/init.d/glassfish.cmsappserver
  11. Open the glassfish.cmsappserver file and make sure the GLASSFISH_HOME variable is set to the location of the GlassFish installation.
    # Application
    APP_LONG_NAME="Glassfish3 Domain CMS App Server"
  12. Add the cmsappserver service by entering /sbin/chkconfig --add glassfish.cmsappserver
  13. Start the service by entering /sbin/service glassfish.cmsappserver start.
  14. Enable the access to the GlassFish Administration Console remotely by entering: GlassFishDirectory/bin/asadmin --host localhost --port 4848 enable-secure-admin
    /opt/glassfish3/glassfish/bin/asadmin --host localhost --port 4848 enable-secure-admin
    If a message similar to the following is displayed, enter Y:
    Do you trust the above certificate [y|N]
  15. Restart the service by entering /sbin/service glassfish.cmsappserver restart.
The GlassFish service is now started.