configUtility command
The configUtility command enables us to download configuration snippets from the Liberty Repository. The command also enables us to replace configuration snippet variables with your input values. tasks.
Syntax
- configUtility action | configUtility configSnippet [options]
where action can take one of the following values:
- find
- Display a list of all configuration snippets in the repository.
Specify a string to filter the list to configuration snippets that have the specified string in the description. Enclose strings that contain spaces in double-quotation marks.
- help
- Display help information for a specified action.
- install
- Download the configuration snippet from the repository or use a local configuration snippet for variable substitution.
The configSnippet variable is the name of the configuration snippet. Run the configUtility find command to get the names of configuration snippets in the repository.
Options
The following options are available for the configUtility install configSnippet command:- --info
- List all variable options in the configuration snippet. Return an empty list if the configuration snippet has no variables for substitution.
- --v[variable]=value
- Replace configuration snippet variables found by the --info option with your input values. The utility identifies these variable using --v[variable]. Do not include the brackets ([]) in the command.
- --createConfigFile=path
- Optional. The utility writes the code snippet to the file specified by path instead of to the console screen. Add the provided code snippet to the server.xml configuration to include the specified file.
- --encoding=[xor|aes]
- Optional. Specify the keystore password encoding. Supported encodings are xor and aes. The default encoding is xor.
- --key=key
- Optional. Specify a key to be used when encoding using AES. This string is hashed to produce an encryption key which is used to encrypt and decrypt the password. Optionally, provide the key to the server by defining the variable wlp.password.encryption.key whose value is the key. If this option is not provided, a default key is used.
- --useLocalFile=file
- Use a configuration snippet from a local file system. We must specify the file path. This option replaces specifying a configuration snippet name.
Usage
The following examples demonstrate correct syntax:
configUtility find configUtility find filter_string configUtility find "filter string" configUtility help configUtility install configSnippet configUtility install configSnippet --info configUtility install configSnippet --vvariable=value configUtility install configSnippet --createConfigFile=C:/wlp/usr/servers/server1/snippet-include.xml configUtility install configSnippet --encoding=aes --key=myAESkey configUtility install --useLocalFile=C:/wlp_temp/mySnippet.xml
Tip: If the option value has spaces, enclose it in double quotation marks ("). For example, if the file path for the --createConfigFile option is /mySnippets/snippet-include.xml, specify --createConfigFile="/mySnippets/snippet-include.xml" in the command.
CAUTION:
Different operating systems and command line environments treat some characters differently. In many environments, we can redefine which characters are special and how they behave. Escape by the caret character (^). The following example has a value of a! encoded.
- /Liberty/images/855/Liberty855/wlp/bin>securityUtility encode "a^!"
For some operating systems, we might need to use single quotation marks around arguments passed to the tool.
If we use a terminal emulator, make sure that your session is configured to use the same code page as the server.
Refer to the operating system, command shell, and terminal emulator documentation about special characters and code pages if you experience unexpected results.