6.2 Setting Up EM CLI

Install the Enterprise Manager EM CLI Client on the Service Manager server system. The EM CLI Client needs to be able to communicate with your OMS.

To install the Enterprise Manager EM CLI Client:

  1. Log into the Enterprise Manager console.
  2. From the Setup menu, select Command Line Interface.
  3. Click the Download the EM CLI kit to your workstation link, and download the emclikit.jar file to the local system.
  4. Transfer the jar file to the Service Manager server system.
  5. At the HP Service Manager server, set your JAVA_HOME environment variable and ensure that it is part of your PATH. You must be running Java 1.6.0_25 or greater. For example:
    setenv JAVA_HOME /usr/local/packages/j2sdk1.6.0_2
    setenv PATH $JAVA_HOME/bin:$PATH
    
  6. Install the EM CLI Client on the Service Manager server. You can install the client portion of EM CLI in any directory using the following command, where <emcli_dir> is the installation directory:
    java -jar emclikit.jar client -install_dir=<emcli_dir>
    
  7. Open a window using the account that runs the Service Manager Server. On a Windows system, this should be the System account.

    To open a window running the System account, run the following command with <time> being 1 minute in the future. At the time specified, a window opens at the system console running under the context of the System account.

    at <time> /interactive cmd.exe
    
  8. Run the following command to configure the EM CLI Client to connect to OMS, where <hostname> is the host name or IP address where the OMS server is located, and <sysman_pwd> is the password for the sysman account in OMS:
    <emcli_dir>\emcli setup -url=https://<hostname>:7801/em -username=<em_super_user> -password=<sysman_pwd>
    
  9. Run the following command to synchronize the EM CLI Client with OMS:
    <emcli_dir>\emcli sync
    

Note:

EMCLI must be installed on the Service Manager server in order to communicate with your OMS.