HomeDocumentation > Configuring and administering > Configuring and administering the Apache Geronimo Server > Customizing server assemblies > Assembling a server via command line

This section illustrates how to assemble a custom server from the command line.

You can use the GShell deploy/assemble command to assemble a custom server. You can type the command with the --help option for instructions about how to use this deploy/assemble command, displayed as follows:

User@server:/>deploy/assemble -help
assemble
 --

  --secure                         Use secure channel
  -a (--artifact) VAL              server artifact name
  -f (--format) VAL                zip or tar.gz
  -g (--groupId) VAL               server groupId
  -h (--help)                      Display this help message
  -l (--list)                      refresh plugin list
  -m (--mode) VAL                  custom assembly mode
  -p (--port) N                    Port, default 1099
  -s (--hostname, --server) VAL    Hostname, default localhost
  -t (--path) VAL                  assembly location
  -u (--username) VAL              Username
  -v (--version) VAL               server version
  -w (--password) VAL              Password

By default, the target location of a newly assembled server is the /var/temp/assembly directory, the target package format is tar.gz and the version number is 1.0. You will have to input a groupId and an artifactId.

# run using ./bin/gsh
User@server:/>deploy/assemble -g org.apache.geronimo.asseblies -a testServer -v 1.0 -u system -w manager

Then GShell will provide you with a list of assembly modes options as follows.

Available custom assembly modes:
 1:    Function Centric
 2:    Application Centric
 3:    Expert Users
Please select a custom assembly mode [1,2,3]

Choose one of the custom assembly modes according to your own cases:

  • Choose 1 or 2 then you have to select the framework plugin group (Geronimo Plugin Group :: Framework) which includes several plugins used to start the server.
  • Choose 3 to assemble a server using plugins as an experienced user. In order to get a working server you must include the plugin (Geronimo Assemblies :: Boilerplate) which includes several files used to start the server.

Note: look into Plugin Group for more details about differences between framework plugin group and boilerplate plugin.

After you input your choice, you will have to select the plugin or plugins group that you intend to install. A few seconds later, your assembly will be ready for use.

**** Installation Complete!
Used existing: cglib/cglib-nodep/2.1_3/jar
...
Installed new: org.apache.geronimo.framework/jsr88-cli/2.2-SNAPSHOT/car

Downloaded 23085 kB in 25s (923 kB/s)

In the <GERONIMO_HOME>/var/temp directory, you will find the package of newly assembled server with minimizing footprint and the fewest components you need. By copying and extracting the package to any places you like, you can start the assembly as an independent server. Startup duration and system modules loaded are greatly reduced. Here is a snapshot of an assembly only with framework plugin group selected after startup.

Booting Geronimo Kernel (in Java 1.6.0)...
Module  1/11 org.apache.geronimo.framework/j2ee-system/2.2-SNAPSHOT/car
                              started in   .000s
Module  2/11 org.apache.geronimo.framework/transformer-agent/2.2-SNAPSHOT/car
                              started in   .000s
Module  3/11 org.apache.geronimo.framework/gshell-framework/2.2-SNAPSHOT/car
                              started in   .000s
Module  4/11 org.apache.geronimo.framework/gshell-geronimo/2.2-SNAPSHOT/car
                              started in   .000s
Module  5/11 org.apache.geronimo.framework/gshell-remote/2.2-SNAPSHOT/car
                              started in   .000s
Module  6/11 org.apache.geronimo.framework/jee-specs/2.2-SNAPSHOT/car
                              started in   .000s
Module  7/11 org.apache.geronimo.framework/rmi-naming/2.2-SNAPSHOT/car
                              started in   .453s
Module  8/11 org.apache.geronimo.plugins.classloaders/geronimo-javaee-deployment
_1.1MR3_spec/2.2-SNAPSHOT/car started in   .000s
Module  9/11 org.apache.geronimo.framework/plugin/2.2-SNAPSHOT/car
                              started in   .516s
Module 10/11 org.apache.geronimo.framework/j2ee-security/2.2-SNAPSHOT/car
                              started in   .140s
Module 11/11 org.apache.geronimo.framework/server-security-config/2.2-SNAPSHOT/c
ar                            started in   .047s
Startup completed in 1.969s seconds
  Listening on Ports:
    1099 0.0.0.0 RMI Naming
    9999 0.0.0.0 JMX Remoting Connector

Geronimo Application Server started

See Plugin Group if you want to learn more.