Sun GlassFish Enterprise Server v3 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 subcommand. This subcommand 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.

You are required to specify an administrative user when you create a domain, or you can accept the default login identity which is username admin with no password.

Before You Begin

Determine which profile will apply to the domain.

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

    You can verify that a name is not already in use by using the list-domains(1) subcommand

  2. Create a domain by using the create-domain(1) subcommand.

    Information about the options for this subcommand is included in this help page.

  3. Type an admin user name and password for the domain.

    To avoid setting up an admin login, you can accept the default admin, with no password. Pressing Return also selects the default.

Example 3–1 Creating a Domain

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

asadmin> create-domain --adminport 4848 domain1
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 8081 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

You can also view the full syntax and options of the subcommand by typing asadmin help create-domain at the command line.