Sun GlassFish Enterprise Server 2.1 Administration Guide

Creating a Domain

Domains are created using the create-domain command. The following example command creates a domain named mydomain. The administration server listens on port 5000 and the administrative user name is admin. The command prompts for the administrative and master passwords.


$ asadmin create-domain --adminport 5000 --adminuser admin mydomain

To start the Admin Console for mydomain domain, in a browser, enter the following URL:


http://hostname:5000

In Enterprise Server 9.1, every domain has a profile associated with it. For information on profiles, see Usage Profiles. You can choose the profile of a domain only during creation. Use the --profile option with the create-domain command to specify a profile for the domain. If you do not use the --profile option to explicitly specify a profile, the default profile is associated with the domain. The AS_ADMIN_PROFILE variable in the asadminenv.conf file defines the default profile.


Caution – Caution –

Do not create an enterprise domain unless you have HADB and the Network Security Services (NSS) keystore. You will not be able to start an enterprise domain unless you have HADB and NSS.


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

domain-root-dir/mydomain

To create the domain’s directory in another location, specify the --domaindir option. For the full syntax of the command, type asadmin help create-domain or the create-domain(1).