sun.com | docs.sun.com |  | How To Buy | My Sun | Worldwide Sites |

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

User Commands | create-instance(1)

- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- OPERANDS
- EXAMPLES
- EXIT STATUS
- INTERFACE EQUIVALENT
- SEE ALSO

## NAME

> create-instance - creates an application server instance with the specified instance name

## SYNOPSIS

> `create-instance` [--user admin_user] [--password admin_password] [--host localhost] [--port 4848] [--sysuser sys_user] [--domain domain_name] [--local=false] [--passwordfile filename] [--secure|-s] `--instanceport instanceport` `instance_name`

## DESCRIPTION

> You can create a new instance on a local or remote machine. When you run the command locally, you can execute commands even when the admin server is not running. However, when this command is executed in local mode, no validations are made to ensure that the --instanceport is not being used by any existing server instances. To validate this execute the `create-instance` command in remote mode by providing the - -user and --password information. This ensures that the instanceport is not being used by any other server instance.

> On a remote machine an administration server is already running for the specified hostname, then the system defaults to the local hostname. To create the instance locally, not requiring the administration server to be up and running, specify the --local option. The named instance must not exist within that domain.

> Note – If the `asadmin` command is not invoked from the application server installation directory, then you must specify the user option when creating an instance. Alternatively, add appserver_install_dir/bin to the PATH.

## OPTIONS

> --user

>   administrative user associated for the instance.

> --password

>   administrative password corresponding to the administrative user.

> --host

>   host name of the machine hosting the administrative instance.

> --port

>   administrative port number associated with the administrative host.

> --sysuser

>   owner of the domain directory.

> --domain

>   name of the domain.

> --local

>   determines if the command should delegate the request to administrative instance or run locally.

> --passwordfile

>   file containing passwords appropriate for the command (e.g., administrative instance).

> --secure

>   if true, uses SSL/TLS to communicate with the administrative instance.

> --instanceport

>   port where the instance listens for requests.

## OPERANDS

> instance_name

>   name of the instance to be created.

## EXAMPLES

> Example 1. Using `create-instance` in local mode

> > >     asadmin> create-instance --domain domain1 --instanceport 8967
> > >     --sysuser adminuser server4
> > >     Created Instance server4 successfully

> > Where: the `server4` instance is created under the `domain1` domain.

> Example 2. Using `create-instance` in remote mode

> > >     asadmin> create-instance --sysuser adminuser --user admin
> > >     --password adminadmin --host localhost --port 4848 --instanceport 8967 server4
> > >     Created Instance server4 successfully

> > Where: the `server4` instance is created on the remote server for the associated user, password, host, and port.

## EXIT STATUS

> 0

>   command executed successfully

> 1

>   error in executing the command

## INTERFACE EQUIVALENT

> Application Server instances page

## SEE ALSO

> `delete-instance`(1), `start-instance`(1), `stop-instance`(1), `restart-instance`(1)

Sun Java System Application Server | Go To Top | Last Changed 30 Dec 2003

Company Info | Contact | Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.