|Home > Documentation > Reference > Tools and commands > GShell > Deploying an Application to a Server Instance in GShell|
The command deploy/deploy can be used to deploy a module to the geronimo instance that is currently connected.
A module file can be one of the following:
The -u and -w options can be used to provide username and password when issuing the command. The -s option can be used to specify the hostname. If none specified, then the hostname defaults to localhost. Likewise -p can be used to specify a port to contact the host on with 1099 being the default. -i can be used to specify an inPlace deployment from the directory you are actually developing the application. In that instance, the path to the application would need to be provided in place of the location of the module.
A deployment plan is necessary to deploy an application. If the deployment plan is not in the WEB-INF directory of a module, then its location must be specified after the module in the command.
deploy/redeploy is used to deploy a newer version of a module onto a server where the older module is already deployed. It functions in a similar way to deploy/deploy but lacks an inPlace deployment option. The username and password is still required and can be provided via command line (-u and -w) or through a prompt after the command is issued. As with the deploy command, the user can specify both port (-p) and hostname (-s) if they differ from the defaults
deploy/undeploy is used to properly remove a module from a server. The command takes the username (-u) and password (-w) options. If not provided, the user will be prompted. As with the deploy command, the user can specify both port (-p) and hostname (-s) if they differ from the defaults. The module id must be provided for the module you wish to undeploy.
deploy/distribute works exactly like deploy/deploy except the module is not started once it has been deployed into the server and is not marked to be started each time the server starts. The command can be issued in the same way, with the same options, as deploy/deploy.