Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 4. Configuring the Data Grid CLI
Define configuration properties for the Data Grid CLI.
4.1. Setting Data Grid CLI Properties and Persistent Storage Copier lienLien copié sur presse-papiers!
Configure Data Grid CLI startup operations and customize the location for persistent storage.
Prerequisites
Create at least one Data Grid user.
Procedure
Optionally set a custom path to the Data Grid CLI storage directory in one of the following ways:
Using the
cli.dirsystem property:bin/cli.sh -Dcli.dir=/path/to/cli/storage ...
$ bin/cli.sh -Dcli.dir=/path/to/cli/storage ...Copy to Clipboard Copied! Toggle word wrap Toggle overflow Using the
ISPN_CLI_DIRenvironment variable:export ISPN_CLI_DIR=/path/to/cli/storage $ bin/cli.sh ...
export ISPN_CLI_DIR=/path/to/cli/storage $ bin/cli.sh ...Copy to Clipboard Copied! Toggle word wrap Toggle overflow
-
Set values for configuration properties with the
config setcommand. Verify configuration properties with the
config getcommand.TipRun
help configto review available configuration properties and get example usage.
4.2. Creating Command Aliases Copier lienLien copié sur presse-papiers!
Create aliases for Data Grid CLI commands to define custom shortcuts.
Procedure
Create aliases with the
alias <alias>=<command>command.For example, set
qas an alias for thequitcommand:[//containers/default]> alias q=quit
[//containers/default]> alias q=quitCopy to Clipboard Copied! Toggle word wrap Toggle overflow Run the
aliascommand to check the defined aliases.[//containers/default]> alias alias q='quit'
[//containers/default]> alias alias q='quit'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Delete aliases with the
unaliascommand, for example:[//containers/default]> unalias q
[//containers/default]> unalias qCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.3. Trusting Data Grid Server Connections Copier lienLien copié sur presse-papiers!
Secure Data Grid CLI connections to Data Grid Server with SSL/TLS certificates. If you create a key store as an SSL identity for Data Grid Server, the CLI can validate server certificates to verify the identity.
Prerequisites
- Set up an SSL identity for Data Grid Server.
- Create at least one Data Grid user.
Procedure
Specify the location of the server key store, as in the following example:
bin/cli.sh config set truststore /home/user/my-trust-store.jks
$ bin/cli.sh config set truststore /home/user/my-trust-store.jksCopy to Clipboard Copied! Toggle word wrap Toggle overflow Define the key store password, if necessary, as follows:
bin/cli.sh config set truststore-password secret
$ bin/cli.sh config set truststore-password secretCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify your CLI configuration.
bin/cli.sh config get truststore bin/cli.sh config get truststore-password
$ bin/cli.sh config get truststore truststore=/home/user/my-trust-store.jks $ bin/cli.sh config get truststore-password truststore-password=secretCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.4. Data Grid CLI Storage Directory Copier lienLien copié sur presse-papiers!
Data Grid CLI stores configuration in the following default directory:
| Operating System | Default Path |
|---|---|
| Linux/Unix |
|
| Microsoft Windows |
|
| Mac OS |
|
This directory contains the following files:
cli.properties- Stores values for CLI configuration properties.
aliases- Stores command aliases.
history- Stores CLI history.