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
HADBand NSS.
Forthe preceding create-domain example, the domain’slog les, conguration les, and
deployedapplications now reside in the following directory:
domain-root-dir/mydomain
Tocreate the domain’s directory in another location, specify the --domaindir option. Forthe
fullsyntax of the command, type asadmin help create-domain or the create-domain(1).
Deleting a Domain
Domainsare deleted using the asadmin delete-domain command. Only the operating system
user(or root) who can administer the domain can execute this command successfully. To delete
adomain named mydomain, for example, type the following command:
$ asadmin delete-domain mydomain
Listing Domains
Thedomains created on a machine can be found using the asadmin list-domains command.
Tolist the domains in the default domain-root-dir directory, type this command:
$ asadmin list-domains
Tolist domains that were created in other directories, specify the --domaindir option.
Starting the Domain
Whenstarting a domain, the administration server and application server instance are started.
Oncethe application server instance is started it runs constantly, listening for and accepting
requests.Each domain must be started separately.
Tostart a domain, type the asadmin start-domain command and specify the domain name.
Forexample, to start the default domain (domain1), type the following:
$ asadmin start-domain --user admin domain1
Ifthere is only one domain, omit the domain name. For the full command syntax, type asadmin
helpstart-domain. If the password data is omitted, you are prompted to supply it.
BasicEnterpriseSer ver Commands
SunGlassFishEnterprise Ser ver2.1 Administration Guide • December 200832