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, 3.1.2.2), 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, ogs-3.1.2.2-unix.sh).
  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.
    • InstallHome.directory.INSTALL_HOME: Set to the directory where the GlassFish software will be installed.
    • JDKSelection.directory.HIDDEN_JDK and JDKSelection.directory.JDK_LIST: 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>-unix.sh -j "<java>" -a answer.txt -s
    Where:
    • <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 ogs-3.1.2.2-unix.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_NAME="glassfish.cmsappserver"
    APP_LONG_NAME="Glassfish3 Domain CMS App Server"
    
    GLASSFISH_HOME=${GLASSFISH_HOME:-"/opt/glassfish3/glassfish"}
    GLASSFISH_DOMAINE=cmsappserver
                     
    ...                 
  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.