Home > Documentation > Reference > Tools and commands > gogo commands for Geronimo |
The gogo commands for Geronimo is an extension of Apache karaf Shell to interact with Geronimo kernel. Those command names are made up of two parts: <scope>:<name> by convention as listed below. Click each command to learn about its usage.
To enter the karaf shell, press Enter after you start up the Geronimo server using geronimo run command.
geronimo:stop-server
deploy:assemble-server
deploy:distribute
deploy:install-plugin
deploy:login
deploy:start-module
deploy:unlock-keystore
geronimo:wait-for-server
deploy:connect
deploy:encrypt
deploy:list-modules
deploy:new-server-instance
deploy:stop-module
equinox:diagnose
Note that if the <name> portion of the command is unique, then you only need to type it. If not, then you must either type the full <scope>:<name> or arrange the scope search path accordingly. For example, you can use list-modules instead of deploy:list-modules to list all modules in the server repository.
Following options are common to those commands:
generaloptions includes:
The server can be started through Felix Shell using the geronimo:start-server command. It uses the following syntax:
start-server generaloptions commandoptions
where
commandoptions includes:
The server can be stopped using the geronimo/stop-server command. It uses the following syntax:
stop-server generaloptions commandoptions
Where
commandoptions includes:
Use this syntax to stop the server.
server> geronimo:stop-server --hostname localhost -p 1099
The command is used to verify if the server has started in the given time (in seconds). It uses the following syntax:
wait-for-server generaloptions commandoptions
Where
commandoptions includes:
The command is used to save the username and password for the current connection to a file to avoid future prompting. This command is used for remote connections only. It has the following syntax:
login generaloptions commandoptions
where
commandoptions includes:
Use this syntax to save the username and password of the current connection so that you will not be prompted for credentials again when you issue other commands via the connection. Make sure you use deploy:connect firstly to connect to a remote instance, then use deploy:login to record the credential.
server> deploy:login
The command is used to generates an encrypted string using org.apache.geronimo.util.EncryptionManager
. It has the following syntax:
encrypt commandoptions string
where
commandoptions includes:
string is a string to be encrypted
Use this syntax to encrypt string passw0rd on an active server so that the encryption settings of that server will be used.
server> deploy:encrypt passw0rd
String to encrypt: passw0rd
Online encryption result:
{Simple}rO0ABXNyABlqYXZheC5jcnlwdG8uU2VhbGVkT2JqZWN0PjY9psO3VHACAARbAA1lbmNv
ZGVkUGFyYW1zdAACW0JbABBlbmNyeXB0ZWRDb250ZW50cQB+AAFMAAlwYXJhbXNBbGd0ABJMamF2YS9s
YW5nL1N0cmluZztMAAdzZWFsQWxncQB+AAJ4cHB1cgACW0Ks8xf4BghU4AIAAHhwAAAAEG2NoqXONCcU
GqfK0reVCpVwdAADQUVT
The command is used to extract a customized server assembly from the current one. It has the following syntax:
assemble-server generaloptions commandoptions
Where
commandoptions includes:
Use this syntax to create a custom server assembly, which is placed at <ce_home>/var/temp/
.
server> deploy:assemble-server -f zip -g group1 -a assemble1
The command is used to start a Java EE application client. Note that before starting a client, you have to deploy the application to the server. It has the following syntax:
start-client generaloptions commandoptions
Where
commandoptions includes:
The command is used to connect to an instance of server that is already running. After connected successfully, you can run a series of commands on the remote server. It has the following syntax:
connect generaloptions commandoptions
Where
commandoptions includes:
Note that you can also use ssh:ssh command provided by Karaf shell to connect to a remote instance.
Use this syntax to connect to a remote server instance:
server> deploy:connect -u system -p manager -s <remote-ip>
The command is used to close the connection to a remote server. Only one instance of the server can be connected at a time, no additional options are needed to specify which server to disconnect from. If you are trying to connect to a second server instance, use this command to disconnect first. It has the following syntax:
disconnect
Use this syntax to disconnect a current connection.
server> deploy:disconnect
The command is used to deploy a module to the server. Once deployed, a module is identified by its module ID within the server. It has the following syntax:
deploy-module generaloptions commandoptions <module> <deployment plan>
where
module is a module file, which is required for the command and can be one of the following Java applications:
deployment plan is an optional plan file for Java EE module. If the deployment plan for a Java EE archive file is not in the WEB-INF directory, its location must be specified after the module in the command. See Creating deployment plans for more details.
commandoptions includes:
Use this syntax to deploy a WAR file.
deploy-module d:/HelloWorld.war
Use this syntax to deploy a WAR file whose deployment plan is located outside of the WEB-INF directory.
server> deploy:deploy-module d:/HelloWorld.war d:/geronimo-web.xml
The command works exactly like deploy-modules 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. It has the same syntax and options as deploy-modules:
distribute-module generaloptions commandoptions <module> <deployment plan>
Use this syntax to distribute a module whose deployment plan is located outside of the WEB-INF directory.
server> deploy:distribute-module d:/HelloWorld.war d:/geronimo-web.xml
The command is used to list all available target repositories on the server. It has the following syntax:
list-targets generaloptions commandoptions
where
commandoptions includes:
Use this syntax to list all available target repository where you can deploy applications to on the localhost.
server> deploy:list-targets
Available Targets:
org.apache.geronimo.framework/j2ee-system/3.0-SNAPSHOT/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/3.0-SNAPSHOT/car,j2eeType=ConfigurationStore,name=Local
The command is used to list all of plug-ins in a Geronimortain maven repository. It has the following syntax:
list-plugins generaloptions commandoptions
where
commandoptions includes:
Use this syntax to first access the list of repositories. Select a repository from the list, plug-ins in this repository is displayed.
list-plugins
Use this syntax to display the list of plug-ins in the given repository using secure channel.
server> deploy:list-plugins --secure -r http://geronimo.apache.org/plugins/geronimo-3.0/
The command is used to create a new server instance. It has the following syntax:
new-server-instance generaloptions commandoptions instancename
where
commandoptions includes:
instancename is the name of the new instance.
Use this syntax to create a new server instance instance2.
server> deploy:new-server-instance instance2
The command is used to deploy a newer version of a module onto a server where the older module is already deployed. It has the following syntax:
redeploy-module generaloptions commandoptions <module> <deployment plan> <module id>
where
module is a module file, which is required for the command and can be one of the following Java applications:
deployment plan is an optional plan file for Java EE module. If the deployment plan for a Java EE archive file is not in the WEB-INF directory, its location must be specified after the module in the command. See Understanding deployment plans for more details.
module id is the configuration on the server you want to replace. If you do not specify the module_id, the plan supplied (or plan inside the module) will be used to determine the actual configuration that you wish to redeploy. Redeploying a plan with an existing module ID allows you to modify the configuration of a running module without intermediate undeployment.
commandoptions includes:
Use this syntax to deploy a newer version of an existing module .
server> deploy:redeploy-module D:/HelloWorld.war default/HelloWorld/1.0/car
The command is used to properly remove a module from a server. It has the following syntax:
undeploy-module generaloptions commandoptions <module id>
where
module id is the configuration name you want to remove from the server. It must be provided.
commandoptions includes:
Use this syntax to remove an existing module.
server> deploy:undeploy-module default/HelloWorld/1.0/car
The command is used to start an existing module on the server which is not running. It use the following syntax:
start-module generaloptions commandoptions <module id>
where
module id is the configuration name you want to start on the server. It must be provided.
commandoptions includes:
Use this syntax to start an existing module.
server> deploy:start-module default/HelloWorld/1.0/car
The command is used to stop a running module on the server. It use the following syntax:
start-module generaloptions commandoptions <module id>
where
module id is the configuration name you want to stop on the server. It must be provided.
commandoptions includes:
Use this syntax to stop a running module.
server> deploy:stop-module default/HelloWorld/1.0/car
The command is used to restart a module on the server. It has the following syntax:
restart-module generaloptions commandoptions <module id>
where
module id is the configuration name you want to restart on the server. It must be provided.
commandoptions includes:
Use this syntax to restart a module.
server> deploy:restart-module default/HelloWorld/1.0/car
The command is used to list modules in the target repository. It has the following syntax:
list-modules generaloptions commandoptions <targetname>
where
commandoptions includes:
targetname is the name of target repository. See list-targets for more details.
Use this syntax to list the started modules in the target repository.
server> deploy:list-modules -r
The command is used to install a geronimo plug-in into the server. It has the following syntax:
install-plugin generaloptions commandoptions <configuration archive>
where
commandoptions includes:
configuration archive is the fully qualified name of plug-in archive. The archive must be a valid plug-in file with .car suffix.
Use this syntax to deploy a CAR file.
server> deploy:install-plugin d:/HelloWorld-1.0.car
The command is used to install a Java library file into the server. Meanwhile, the library file will be converted into an OSGi by the server. It has the following syntax:
install-library generaloptions commandoptions <configuration archive>
where
commandoptions includes:
configuration archive is the fully qualified name of library archive.
If installed successfully, the library will be found in <geronimo_home>/repository
. Meanwhile, the library file will be converted into an OSGi by the server.
Use this syntax to install a java library file.
server> deploy:install-library d:/temp/openejb-ejbd-3.2-SNAPSHOT.jar
The command is used to install an OSGi bundle or a common jar library file into the server(the jar file will be converted into an OSGi bundle), and the bundle information will be recorded in etc/startup.properties
file. It has the following syntax:
install-bundle generaloptions commandoptions <bundle file>
where
commandoptions includes:
bundle file is the fully qualified name of bundle to be installed.
Use this syntax to install an OSGi bundle. If the file is a jar library file, the library file will be converted into an OSGi bundle by the server.
server> deploy:install-bundle --groupId myCompany --start --startLevel 100 d:/HelloWorld-1.0.jar
The command is used to uninstall a bundle in server. It has the following syntax:
unlinstall-bundle generaloptions commandoptions bundleId
where
commandoptions includes:
bundleId is id of the bundle to be uninstalled.
Use this syntax to uninstall an OSGi bundle with id 361 in the server.
server> deploy:uninstall-bundle 361
The command is used to unlock a keystore and private key in server. It has the following syntax:
unlock-keystore generaloptions commandoptions <keystore>
where
commandoptions includes:
keystore is the name of keystore or private key you want to unlock.
The command is used to diagnose constraints of an installed OSGi bundle and verify if the bundle can be resolved successfully. The command is only available in Equinox OSGi runtime.
diagnose generaloptions commandoptions <bundleIDs>
where
commandoptions includes:
bundleIDs is a list of bundle IDs seperated by whitepaces.
Use this syntax to diagnose the resolver problem of a bundle with Id 85.
server> diagnose 85
mvn:org.apache.geronimo.framework/geronimo-service-builder/3.0-SNAPSHOT [85]
No unresolved constraints.
The command is used to resolve constraints of an Aries applications and create the deployment manifest application.MF
for the application.
resolve generaloptions commandoptions <AppPath>
where
commandoptions includes:
AppPath is location of Aries application to be resolved.
Use this syntax to resolve an Aries application.
server> eba:resolve d:/temp/myAriesApp.eba
Attempting to resolve myAriesApp application.
Application myAriesApp is now resolved.
The command is used to refresh bundle status in the repository of Geronimo server. This command is useful when you installed a new bundle in to Geronimo server and want the bundle information to be added in to the bundle repository of the server.
geronimo-refresh generaloptions
Bookmark this on Delicious Digg this | Privacy Policy - Copyright © 2003-2013, The Apache Software Foundation, Licensed under ASL 2.0. |