Generating a Liberty server plug-in configuration by using the pluginUtility command

You can generate the plug-in configuration file for a Liberty server by running the pluginUtility command. You can run the command for a target server that is either a local server or a remote server.

Before you begin

Complete the following items:
  • Distributed: [AIX MacOS Linux Windows]Ensure that for the target server, the localConnector-1.0 feature is enabled for a local server and the restConnector-2.0 feature is enabled for a remote server.
  • For IBM i platformsEnsure that for the target server the restConnector-2.0 feature is enabled.
  • Ensure that the target server is running.
  • For a remote server, set the JVM property of com.ibm.webserver.plugin.utility.autoAcceptCertificates to true to automatically accept SSL certificate chains.
  • Ensure that the target server has the servlet-3.0 feature or the servlet-3.1 feature enabled.

About this task

To create the plug-in configuration file, choose which steps in the procedure to run based on whether you have a local server or a remote server.

Procedure

  • Run the pluginUtility command for a local server.
    Example:
    pluginUtility generate --server=myServer --targetpath=./pluginFiles/plugin-cfg.xml
    • The myServer value is the name for the server ID.
    • The ./pluginFiles/plugin-cfg.xml value is the location of the plug-in configuration file. The ./pluginFiles directory must exist. If you do not specify the targetpath parameter, the plug-in configuration file is generated in the current directory with the name of plugin-cfg.xml.
  • Run the pluginUtility command for a remote server.
    Important:

    If the JVM property of com.ibm.webserver.plugin.utility.autoAcceptCertificates is not set to true, accept the SSL certificate chain when prompted. If you do not accept the SSL certificate chain, the web server plug-in configuration file is not generated.

    Example:
    pluginUtility generate --server=userName:mypassword@testHost:9443 --targetpath=./pluginFiles/plugin-cfg.xml
    • The userName:mypassword:testHost:9443 value consists of the user name for the administrator (userName), the password for the administrator (mypassword), the host for the target server (testHost), and the port number of the target server (9443).

      If you do not specify a user name, a password, or both, the command prompts you for them.

    • The ./pluginFiles/plugin-cfg.xml value is the location of the plug-in configuration file. The ./pluginFiles directory must exist. If you do not specify the targetpath parameter, the plug-in configuration file is generated in the current directory with the name of plugin-cfg.xml.