Wiki Markup |
---|
{scrollbar} |
Wiki Markup |
Excerpt |
---|
GShell is an extensible, command-line processing environment for creating command-line applications |
...
This document is organized in the following sections:
Table of Contentschildren |
---|
Running GShell
A simple launcher script/.bat file is located in the <geronimo_home>/bin directory. To start GShell just type gsh
GShell commands may be specified when starting GShell:
./gsh deploy/list-modules
or commands may be entered interactively:
Panel |
---|
coltrane kevan$ ./gsh Type 'help' for more information. |
The help
command will display all GShell commands that are available in the current environment.
Code Block |
---|
kevan@coltrane:/> help
For information about Apache Geronimo, visit:
http://geronimo.apache.org
Available commands:
execute-alias Execute an alias
exit Exit the shell
print Alias to: echo
alias Create an alias
source Load a file/url into the current shell
? Alias to: help
. Alias to: source
unalias Remove an alias
unset Unset a variable
help Show command help
echo Echo or print arguments to STDOUT
clear Clear the terminal screen
quit Alias to: exit
set Set a variable
remote-control
server-control Remote server control
deploy
undeploy Undeploy a module
connect Connect to a Geronimo server
install-library Install library
stop Stop a module
list-targets List targets
restart Restart a module
install-plugin Install a plugin
list-plugins Install plugins into a geronimo server
start Start a module
assemble Extract a geronimo server from the current one
deploy Deploy a module
list-modules List modules
redeploy Redeploy a module
distribute Distribute a module
disconnect Disconnect from a Geronimo server
remote
rsh-server Start a GShell server
rsh Connect to a remote GShell server
geronimo
stop-server Stop a Geronimo server
start-client Start a Geronimo application client
start-server Start a Geronimo server
|
The quit
command will exit the GShell environment.
To obtain help information on any command, use the {--help} option:
Code Block |
---|
kevan@coltrane.local:/> deploy/list-modules --help
list-modules
--
TARGET Target name
-a (--all) Show started or stopped modules
-h (--help) Display this help message
-p (--port) N Port, default 1099
-r (--started) Show started modules only
-s (--hostname, --server) VAL Hostname, default localhost
-t (--stopped) Show stopped modules only
-u (--username) VAL Username
-w (--password) VAL Password
|
Geronimo GShell Commands
The following deploy
commands are available:
Code Block |
---|
deploy/deploy Deploy a module
deploy/undeploy Undeploy a module
deploy/start Start a module
deploy/stop Stop a module
deploy/restart Restart a module
deploy/list-modules List modules
deploy/redeploy Redeploy a module
deploy/distribute Distribute a module
deploy/connect Connect to a Geronimo server
deploy/disconnect Disconnect from a Geronimo server
deploy/install-library Install library
deploy/list-targets List targets
deploy/install-plugin Install a plugin
deploy/list-plugins Install plugins into a geronimo server
deploy/assemble Extract a geronimo server from the current one
|
Code Block |
---|
geronimo/start-server Start a Geronimo server
geronimo/stop-server Stop a Geronimo server
geronimo/start-client Start a Geronimo application client
|
More complete documentation is needed on these...
Starting and Stopping Geronimo in Gshell
Geronimo can be started through gshell using the geronimo/start-server
command
Code Block |
---|
jason@Jason-Warners-Computer.local:/> geronimo/start-server --background
Launching Geronimo Server...
Booting Geronimo Kernel (in Java 1.5.0_13)...
|
If the --background option is not used, then the server instance will maintain control of the terminal and a new instance of gshell must be started to interact with the server
Other Useful geronimo/start-server
options (Use geronimo/start-server --help
to see a full list of options)
Code Block |
---|
-D (--property) NAME=VALUE Define system properties
-G (--gproperty) NAME=VALUE Define an org.apache.geronimo property
-H (--home) DIR Use a specific Geronimo home directory
-j (--jvm) DIR Use a specific Java Virtual Machine for server
process
-l (--logfile) FILE Capture console output to file
|
Geronimo can be stopped using the geronimo/stop-server
command
Code Block |
---|
jason@Jason-Warners-Computer.local:/> geronimo/stop-server -u system -w manager
Stopping Geronimo server: localhost:1099
[] received stop signal
|
If username (-u) and password (-w) are not provided on the command line, the user will be prompted for them before the server can shutdown.
The full set of geronimo/stop-server
options can be seen in gshell using the --help
option
Due to a bug in Geronimo v2.1 (https://issues.apache.org/jira/browse/GERONIMO-3845), stop-server will only work if you use system as your admin username and manager as your password. This bug will be addressed in the next Geronimo release. You can always use the shutdown command (shutdwon.sh|bat) to stop your server.
Connecting to an Already Running Geronimo Instance
deploy/connect
can be used to connect to an instance of Geronimo that is already running. If no options are provided, then the default port and host will be used to connect to a server. The port (-p) option is used to specify a non-default port and the hostname (-s) option can be used to specify a remote hostname.
Code Block |
---|
jason@Jason-Warners-Computer.local:/> deploy/connect --port 1099 --hostname foo.bar.com
Connecting to Geronimo server: foo.bar.com:1099
Username: system
Password: *******
|
Note | ||
---|---|---|
| ||
When issuing a geronimo/stop-server command to a remote server, the hostname must be provided (and the port if it is not default) even if you are currently connected to that server via deploy/connect |
deploy/disconnect
can be used to disconnect from an already connected instance of geronimo. Since only one instance of geronimo can be connected at a time, no options are needed to specify which server to disconnect from.
...
|