Install and administrate Glassfish

Document ID : KB000089742
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Install and administrate Glassfish
Resolution:
WARNING: This article is a reference guide only.  As this is regarding the administration and installation of a third party product that is not associated with Automic in any way, any troubleshooting or errors that arise using this guide will need to be resolved by a system admin or the owner of the third party software itself.

Detailed Description and Symptoms
How to install and administer Glassfish

Solution

Installing Glassfish
Glassfish v2 is supported by Automic. To install Glassfish, go to https://glassfish.dev.java.net/downloads/v2.1.1-final.html and choose the version of Glassfish you would like.
For Windows
NOTE: You do need a jdk installed

1. Download glassfish-installer-v2.1.1-windows.jar and place into the C:\ directory
2. Open the command prompt (as admin if necessary)
3. Navigate to C:\
4. Run the command:
       java -Xmx256m -jar filename.jar
This will create the directory C:\Glassfish
5. Navigate to C:\Glassfish
6. Set your PATH variable to your jdk\bin directory using the command:
       set PATH=<path to jdk>\bin
7. Navigate to C:\Glassfish\lib\ant\bin and run the command:
       ant -f C:\glassfish\setup.xml
Starting Glassfish
• ) Be sure that your %PATH% environment variable has the C:\glassfish\bin path somewhere in it
• ) Be sure you've created an environment variable called AS_ADMIN_USER which has the OS user you'd like to be the admin of Glassfish
1) Open the command prompt (as admin if necessary)
2) Navigate to C:\glassfish\bin and execute the command:
       asadmin start-domain domain1
domain1 refers to the domain that will be started (and is a folder name in the domains folder) This may take a few minutes to start
You should now be able to go to <server>:8080
Glassfish Admin Console - Deploying OM Web Services
1) Open a browser and navigate to <server>:4848
2) The defaults are:
  User Name: admin
  Password: adminadmin
Setting up the Automic user
1) In the left-hand pane, go to Configuration, Security, Realms, file
2) Click Manage Users
3) Click New...
4) Fill in the following (change <pass> to the password to be used):
     User ID: automic
      Group List: automic
      Password: <pass>
     Confirm New Password: <pass>
5) Click OK
Deploying the .war file
1) Starting from <server>:4848, click on "Deploy Web Application (.war)" under the Deployment section in the right hand pane.
2) Either choose Packaged file to be uploaded to the server and point to uc4ws.war or choose a Local package and point to uc4ws.war.
3) Keep the defaults on everything except the Application Name. Choose a name or put in uc4ws
4) Click OK
Checking status of Glassfish
1) Open command line (as admin if necessary)
2) Navigate to C:\Glassfish\bin and run the following command:
    asadmin list-domains
• If the domain is running, you will see:
     domain1 running
     Command list-domains executed successfully.
• If the domain is not running, you will see:
     domain1 not running
     Command list-domains executed successfully.
Installing a Windows Service for Glassfish
Taken from http://wiki.glassfish.java.net/Wiki.jsp?page=FaqRunAsWindowsService:
1) Download the GlassfishSvc.jar file and put it into the C:\Glassfish directory
2) Open a command prompt (as admin if necessary) and run the command:
    java -jar GlassfishSvc.jar -i