Sun GlassFish Enterprise Server v3 Prelude Administration Guide

ProcedureTo Create a Domain

After installing Enterprise Server and creating the default domain (domain1), you can create additional domains by using the local create-domain command. This command creates the configuration of a domain.

Any user who has access to the asadmin utility on a given system can create a domain and store the domain configuration in a folder of choice. By default, the domain configuration is created in the default directory for domains. You can override this location to store the configuration elsewhere.

  1. Select a name for the domain that you are creating.

    You can verify that a name is not already in use by listing the existing domains:

    asadmin list-domains
  2. Create a domain by using the create-domain(1) command.

Example 2–1 Creating a Domain

The following example command creates a domain named domain1 . When you type the command, you might be prompted for login information.

asadmin create-domain --adminport 4848 domain1

Information similar to the following is displayed:

Enter admin user name[Enter to accept default]>
Using port 4848 for Admin.
Default port 8080 for HTTP Instance is in use. Using 1161
Using default port 7676 for JMS.
Using default port 3700 for IIOP.
Using default port 8181 for HTTP_SSL.
Using default port 3820 for IIOP_SSL.
Using default port 3920 for IIOP_MUTUALAUTH.
Default port 8686 for JMX_ADMIN is in use. Using 1162
Distinguished Name of the self-signed X.509 Server Certificate is:
[,OU=GlassFish,O=Sun Microsystems,L=Santa Clara,ST
Domain domain1 created.
Command create-domain executed successfully.

To start the Administration Console in a browser, enter the URL in the following format:


For this example, the domain’s log files, configuration files, and deployed applications now reside in the following directory:


See Also

To see the full syntax and options of the command, type asadmin create-domain --help at the command line.