Administering Liberty manually

You can administer Liberty from the command prompt, configure it with web server plug-ins, and capture its status. You can package a Liberty server configuration along with the applications that it runs, for distribution to colleagues, or installation on other systems. If available, you can use the Equinox OSGi console to aid with debugging.

About this task

The server.xml file is the primary configuration file for the server. You can edit this file, and the files it includes, in a text editor. You can also change the location of the server.xml file. However, for most configurations you do not need to do this.

The bootstrap.properties file is used to specify properties that need to be available before the main configuration is processed. If you update the bootstrap.properties file, you must restart the server for the changes to take effect.

Example

All the elements that can be configured in the server.xml file, and the files it includes, are described in Liberty features. However, the only required element is a server definition:
<server/>
Beyond this server definition, you only specify overrides and additions to the default configuration values. For example, for transactions started on this server, you can set the maximum time that is allowed for each of the transactions to complete. To do this, you specify:
<transaction totalTranLifetimeTimeout="30s"/>
Some attributes can have multiple values. For example, you use a list of values to define the features that are to be provided by the server:
<server>
  <featureManager>
    <feature>servlet-3.0</feature>
    <feature>localConnector-1.0</feature>
  </featureManager>
</server>
See also Adding and removing Liberty features.
Where multiple instances of a resource type can be configured, for example applications or data sources, you need only provide the attributes that are unique for the resource. You can let the other attributes use the default values, or override them as needed. Therefore the contents of the server.xml file can be brief. For example, here is a complete server configuration to run a web application:
<server>
     <featureManager>
         <feature>servlet_3.0</feature>
     </featureManager>
     <application name="snoop" location="/mywebapps/snoop" id="snoop" type="war"/>
</server>

For detailed information about specific aspects of server configuration, see the subtopics.