For IBM i platforms

iAdmin command

The command supports operating a Liberty server on the IBM® i platform. The command file is in the wlp/lib/native/os400/bin directory. The command file is a script named iAdmin.

Syntax

The command syntax is as follows:

iAdmin task [options]
where the value of task can be one of the following options:
  • POSTINSTALL
  • PREUNINSTALL
  • GRANTAUTH
The POSTINSTALL task configures the server start command to launch servers as jobs in the QWAS9 subsystem. Additionally, the task:
  • Configures Liberty to run servers under the QEJBSVR user profile.
  • Configures the default JDK location by setting WLP_DEFAULT_JAVA_HOME in file wlp/etc/default.env to the location of the 32 bit version of the minimum supported Java™ level.
  • Adds an entry for the product in the IBM i native product registry.
  • Creates IBM i native libraries and objects such as the QWAS9 subsystem and the QEJBSVR user profile.

Call the iAdmin POSTINSTALL command only after Installing Liberty by extracting an archive file..

The GRANTAUTH task grants the QEJBSVR user profile the necessary file permission and ownership for the server role. The POSTINSTALL sets the file ownership and authorities correctly for the QEJBSVR user profile. However, if you create files manually, or if you modify the authorities on files used by the Liberty server, you can call the iAdmin GRANTAUTH command to ensure that QEJBSVR has the correct authorities.

The PREUNINSTALL task removes the native libraries and objects created by the POSTINSTALL task. Call the iAdmin PREUNINSTALL command before removing the Liberty application-serving environment from your system, but you only need do so if Liberty was installed by executing a JAR file.

Note:
  • You must have *ALLOBJ and *SECADM special authority to use the POSTINSTALL and PREUNINSTALL commands.
  • You must have *ALLOBJ special permission, own, or have *OBJMGT authority to all objects in the specified directory subtrees to use the GRANTAUTH command.
  • After running the POSTINSTALL task, you must also have *ALLOBJ and *SECADM special authority to start and stop the Liberty server.

Options

The following options are available for the iAdmin command:
--outputdir wlp_user_dir
The directory for server generated files. This option must only be an absolute path, is optional for the GRANTAUTH task, and is ignored for all other tasks. When not specified, the default location for server generated output is used.
--rolename role_name
The role that the user profile is assigned. The server role is the only currently supported role. This option is required for the GRANTAUTH task and is ignored for all other tasks.
--userdir wlp_user_dir
The directory containing shared resources and server definitions. This option can only be an absolute path, is optional for the GRANTAUTH task, and is ignored for all other tasks. When not specified, the default location for shared resources and server definitions is used.
--userprofilename user_profile_name
The user profile to grant authority to. QEJBSVR is the only currently supported user profile name for the server role. This option is required for the GRANTAUTH task and is ignored for all other tasks.

Usage scenarios

The following examples demonstrate correct syntax. Run the command in any of the following examples on one line.
  • Configuring Liberty to start as a job in the QWAS9 subsystem and to swap to the QEJBSVR user profile when running.
    wlp/lib/native/os400/bin/iAdmin POSTINSTALL
  • Granting the server role to the QEJBSVR user profile for the shared resources, server definitions, and output locations configured for this Liberty runtime environment.
    wlp/lib/native/os400/bin/iAdmin GRANTAUTH --rolename server --userprofilename QEJBSVR
  • Removing the native libraries and objects created by the POSTINSTALL task.
    wlp/lib/native/os400/bin/iAdmin PREUNINSTALL