7 Installing Oracle Remote Management Agent in Silent Mode

This chapter describes how you can install Oracle Remote Management Agent (Remote Agent) in silent mode. In particular, this chapter covers the following:

Overview of Installing a Remote Agent in Silent Mode

Installing a Remote Management Agent (Remote Agent) in silent mode is only an alternative to installing it using the Add Host Targets Wizard. It requires to use a response file for providing installation details and deployment scripts to install the remote agents.

Installing in silent mode is useful when you want to install an additional Remote Agent on a destination host from the destination host itself, without using the Add Host Targets Wizard UI.

You can install Remote Agents in silent mode using the following methods:

Using the AgentPull Script

In this method, you do not have to use EM CLI to download the Management Agent software onto the remote destination host before executing the script to install the Management Agent. This method supports only a few additional parameters, and is ideal for a basic Management Agent install.

Using the agentDeploy Script

In this method, you must use EM CLI to download the Management Agent software onto the remote destination host before executing the script to install the Remote Agent. You can either choose to use EM CLI from the OMS host, or from the remote destination host. If you choose to use EM CLI from the OMS host, you must transfer the downloaded Management Agent software to the remote destination host before executing the script to install the Management Agent. This method supports many additional parameters, and is ideal for a customized Management Agent install.

Once the installation is complete, you will see the following default contents in the agent base directory:

<agent_base_directory>
    |_____agent_24.1.0.0.0
          |_____sbin
          |_____OPatch
          |_____agent.rsp
          |_____bin
          |_____cfgtoollogs
          |_____config
          |_____install
          |_____instalclient
          |_____.
          |_____.
          |_____.
    |_____agent_inst
    |_____agentInstall.rsp
    |_____agentimage.properties

Note:

You can repoint your existing Management Agents to a new Oracle Management Service (OMS). For instructions, see Redirecting Oracle Management Agent to Another Oracle Management Service.

When you repoint your existing Management Agents to a new OMS, you cannot move the targets monitored by the Management Agents, the target history, and the Management Agent history. The monitored targets and the history data is lost.

Before You Begin Installing a Remote Agent in Silent Mode

Before you begin installing a Remote Agent in silent mode, keep these points in mind:

  • You can install a Remote Agent on only one host at a time by using the silent methods. Therefore, use this approach when you want to install a Remote Agent on only a few hosts.

  • The Management Agent software for the platform of the host on which you want to install a Remote Agent must be downloaded and applied, using Self Update. Only the Management Agent software for the OMS host platform is downloaded and applied by default. The Management Agent software contains the core binaries required for installation, the response file to be edited and passed, and the agentDeploy.sh script.

    For information on how to download and apply the Management Agent software for a platform using Self Update, see Acquiring the Management Agent Software in Online Mode in the Oracle Enterprise Manager Basic Installation Guide.

  • Parallel deployment of Management Agents using the AgentPull.sh script is supported. This enables you to deploy Management Agents on multiple hosts, at the same time (in a parallel manner) using the AgentPull.sh script.
  • You cannot run any preinstallation or postinstallation scripts as part of the installation process. You can run them manually before or after the installation.

  • By default, installing a Remote Agent in silent mode configures only the following types of plug-ins:

    • All discovery plug-ins that were configured with the OMS from where the Management Agent software is being deployed.

    • Oracle Home discovery plug-in.

    • Oracle Home monitoring plug-in.

Prerequisites for Installing a Remote Agent in Silent Mode

Before installing a Remote Agent in silent mode, ensure that you meet the following prerequisites:

Table 7-1 General Prerequisites for Installing Remote Agents

Requirement Description

Hardware Requirements

See My Oracle Support Doc ID 3076694.1.

Operating System Requirements See unresolvable-reference.html#GUID-41B02FB6-7BA7-4835-BC65-38C974FC9B56.

Destination Host Requirements

Confirm that the remote host has not been discovered by Enterprise Manager. The remote agent host should not contain any local targets.

Ensure the host you are selecting for remote agent installation is free from any software installation.

Destination Host Credential Requirements

SSH key or password-based credentials are required.

If you choose SSH credentials, the SSH keys are required to get configured prior installing the remote agent.

sudo/pbrun/sesu/su SSH Requirements

Use sudo when adding named credentials using the Add Remote Host Targets Wizard or EM CLI.

Power broker is not supported in Enterprise Manager 24ai Release 1.

Check if user needs to configure passwordless sudo During the Add Remote Host Targets configuration, the following credentials are available:
  • Monitoring Credentials: Normal user credential which does not possess root privileged credentials. They are used to execute non-privileged operations.

  • Admin Credentials: Credentials used to execute privileged operations which requires root access. Admin credential is not a mandatory input, user can anytime make it optional by executing the following command from remote agent:

    emctl setproperty agent -name _remoteHostRequireAdminCreds -value false

Check if Passwordless sudo is configured for the user on the remote host
Monitoring user on the remote host should be configured not to prompt for password. To check, do the following:
  • Run: sudo -s

    The above command should not prompt for password.

  • Change to root user by running: . /usr/bin/id -u

    The output fo the above command should be: root.

  • Edit /etc/sudoers file to provision the user that will be used in discovering the target from the UI. You need to add the following under the # User privilege specification section in /etc/sudoers file:
    # User privilege specification
    root ALL=(ALL) ALL 
    <username> ALL=NOPASSWD:ALL

    Example: presharm ALL=(ALL) NOPASSWD: ALL

  • Modify the permissions of the /etc/sudoers file to chmod 440.

For additional prerequisites, see unresolvable-reference.html#GUID-707CAE59-AD17-4E8C-8C0E-7B9B2D3FFE70.

Installing a Remote Agent in Silent Mode

This section describes the actions involved in installing a Remote Agent in silent mode. It consists of the following:

Note:

If the OMS host is running on Microsoft Windows, and the OMS software was installed in a drive other than C:\, then update the SCRATCH_PATH variable in ORACLE_HOME\oui\prov\resources\ssPaths_msplats.properties.

For example, if the OMS software was installed in D:\, ensure that you update the SCRATCH_PATH variable to D:\tmpada

Installing a Remote Agent Using the AgentPull Script

  1. If the destination host runs on UNIX, and the OMS host runs on Microsoft Windows, run the following command:

    dos2unix <absolute_path_to_AgentPull.sh>

    For example, run the command dos2unix /tmp/AgentPull.sh.

  2. Create a response file (in any location on the destination host) specifying the parameters described in Table 6-3. Ensure that you do not name the response file agent.rsp.

    The following are the contents of a sample response file, agent.properties.

    LOGIN_USER=sysman
    LOGIN_PASSWORD=sysman_password
    PLATFORM="Linux x86-64"
    AGENT_REGISTRATION_PASSWORD=wel246come
    REMOTE_AGENT=true

    If you want the script to ignore a particular response file parameter, specify a '#' before the parameter. For example, #VERSION.

  3. Run the AgentPull.sh script for Unix specifying the AGENT_BASE_DIR and RSPFILE_LOC parameters:
    AgentPull.sh RSPFILE_LOC=<value> AGENT_BASE_DIR=<value> ORACLE_HOSTNAME=<value>

    For example, run the following command:

    /tmp/AgentPull.sh RSPFILE_LOC=/tmp/agent.properties AGENT_BASE_DIR=/u01scratch/agent ORACLE_HOSTNAME=vm001.example.com

    The AgentPull.sh script supports certain options, such as -download_only, which downloads the Management Agent software, but does not deploy the Remote Agent. These supported options are described in Table 6-6.

    If the Management Agent install fails, diagnose the problem by viewing the Management Agent install logs. For information on the location of these logs, see Manual Management Agent Installation Logs.

Installing Remote Agent using AgentDeploy Script

To install a Remote Agent using the agentDeploy script, and EM CLI from the destination host, follow these steps:

  1. Acquiring the Management Agent Software and Downloading it onto the Destination Host Using EM CLI.

    1. Set up EM CLI on the destination host.

      For information on how to set up EM CLI on a host that is not running the OMS, see EM CLI Overview and Concepts in the Oracle Enterprise Manager Command Line Interface Guide.

    2. On the destination host, from the EM CLI install location, log in to EM CLI:

      <emcli_install_location>/emcli login -username=<username>

      For example,

      <emcli_install_location>/emcli login -username=sysman

      Specify the password when you are prompted for it.

      Note:

      Ensure that the EM CLI log in user has the ADD_TARGET privilege.

    3. Synchronize EM CLI:

      <emcli_install_location>/emcli sync

    4. Identify the platforms for which the Management Agent software is available in Software Library:

      <emcli_install_location>/emcli get_supported_platforms

      This command lists all the platforms for which the Management Agent software is available in Software Library. The following is the sample output of the command.

      ---------------------------------------------------
      Version = 24.1.0.0.0
      Platform Name = Linux x86-64
      ---------------------------------------------------
      

      If the output lists the platform on which you want to install the Management Agent, then proceed to the next step. Otherwise, acquire and apply the Management Agent software for the required platform using Self Update.

      For information on how to acquire and apply the Management Agent software for a platform using Self Update, see Acquiring the Management Agent Software in Online Mode in the Oracle Enterprise Manager Basic Installation Guide.

    5. Download the Management Agent software from Software Library to a temporary directory on the destination host. The command downloads the core Management Agent software to the destination directory you entered. For example, for Linux x86-64, you will see the file 24.1.0.0.0_AgentCore_226.zip. For information on the contents of this core software, see Contents of the Downloaded Management Agent Software.

      <emcli_install_location>/emcli get_agentimage -destination=<download_directory> -platform="<platform>" -version=<version>

      For example,

      ./emcli get_agentimage -destination=/tmp/agentImage -platform="Linux x86-64" -version=24.1.0.0.0

      In the command, note the following:

      -destination is a directory on the destination host where you want the Management Agent software to be downloaded. Ensure that you have write permission on this location.

      -platform is the platform for which you want to download the software; this must match one of the platforms listed in the previous step for which the software is available in Software Library.

      -version is the version of the Management Agent software that you want to download; this is an optional argument. If you do not pass this argument, then the version is defaulted to the OMS version.

      Note:

      If you use the get_agentimage EM CLI verb to download the Management Agent software for a platform different from the destination host platform, then meet the following requirements:

      • Ensure the ZIP utility is of version 3.0 2008 build or higher, and the UNZIP utility is of version 6.0 or higher.

      • Set the ZIP_LOC environment variable to the subdirectory where the ZIP utility is present. For example, if the ZIP utility is present in /usr/bin/zip, then set ZIP_LOC=usr/bin/zip.

      • Set the UNZIP_LOC=usr/bin/unzip environment variable to the parent directory of the subdirectory where the UNZIP utility is present. For example, if the UNZIP utility is present in the subdirectory /usr/bin/unzip, then set UNZIP_LOC=usr/bin/, where usr/bin is the parent directory.

      Similarly, if you use the get_agentimage EM CLI verb to download the Management Agent software for a platform different from the OMS host platform, then meet the following requirements:

      • Ensure the ZIP utility is of version 3.0 2008 build or higher, and the UNZIP utility is of version 6.0 or higher.

      • Set the ZIP_LOC environment variable to $OMS_HOME/bin/zip, that is, the subdirectory where the ZIP utility is present on the OMS host.

      • Set the UNZIP_LOC=<ORACLE_HOME>/bin/unzip environment variable to <ORACLE_HOME>/bin/, that is, the parent directory of the subdirectory where the UNZIP utility is present in the Oracle home of the OMS host.

  2. Installing the Management Agent Using the agentDeploy Script.

    1. On the destination host, extract the contents of the ZIP file using the unzip utility:

      unzip <software_zip_file_location> -d <software_extract_location>

      For example,

      unzip /tmp/agentImage/24.1.0.0.0_AgentCore_226.zip -d /tmp/agtImg

    2. Edit the response file agent.rsp as described in Table 6-4.

      <software_extract_location>/agent.rsp

      The following are the contents of a sample response file.

      OMS_HOST=example.com
      EM_UPLOAD_PORT=14511
      AGENT_REGISTRATION_PASSWORD=abc123
      AGENT_PORT=1832
      

      If you want the script to ignore a particular response file parameter, specify a '#' before the parameter. For example, #AGENT_PORT.

    3. Invoke the deployment script and pass the response file:

      <software_extract_location>/agentDeploy.sh AGENT_BASE_DIR=<absolute_path_to_agentbasedir> OMS_HOST=<host_value> EM_UPLOAD_PORT=<em_port> AGENT_REGISTRATION_PASSWORD=<password_value> RESPONSE_FILE=<software_extract_location>/agent.rsp REMOTE_AGENT=true

      If a proxy is set up between the destination host and the OMS host, you must specify the REPOSITORY_PROXYHOST and REPOSITORY_PROXYPORT parameters in a properties file, then specify the PROPERTIES_FILE parameter while running agentDeploy.sh to install a Management Agent on the destination host:

      <software_extract_location>/agentDeploy.sh AGENT_BASE_DIR=<absolute_path_to_agentbasedir> RESPONSE_FILE=<absolute_path_to_responsefile> PROPERTIES_FILE=<absolute_path_to_properties_file> REMOTE_AGENT=true

      For example, /tmp/agtImg/agentDeploy.sh AGENT_BASE_DIR=/scratch/agent24 RESPONSE_FILE=/tmp/agtImg/agent.rsp PROPERTIES_FILE=/tmp/agent.properties REMOTE_AGENT=true

      The properties file you use must have the following format:

      REPOSITORY_PROXYHOST=<proxy_host_name>
      REPOSITORY_PROXYPORT=<proxy_port>
      

      Note:

      • Instead of passing a response file, you can choose to pass response file parameters explicitly while invoking the deployment script.

        The mandatory response file parameters are OMS_HOST, EM_UPLOAD_PORT and AGENT_REGISTRATION_PASSWORD.

        For example,

        /tmp/agtImg/agentDeploy.sh AGENT_BASE_DIR=/u01/software/em24/agentbasedir OMS_HOST=example.com EM_UPLOAD_PORT=14511 AGENT_REGISTRATION_PASSWORD=2bornot2b REMOTE_AGENT=true

      • When you pass the arguments while invoking the deployment script, these values need not be given with double quotes. However, when you provide them in a response file, the values need to be in double quotes (except for the argument START_AGENT).

      • In addition to passing the agent base directory and a response file (or individual mandatory arguments with installation details), you can also pass other options that are supported by the deployment script. For more information, see Options Supported by the agentDeploy Script.

    4. Run the root scripts after the install. For more information, see After Installing a Management Agent in Silent Mode.

If you want to install a Management Agent on a physical host, and install another Management Agent on a virtual host that is installed on the physical host, ensuring that both the Management Agents use the same port for communication, follow these steps:

  1. Install a Management Agent on the physical host. Stop the Management Agent.

  2. Install a Management Agent on the virtual host. Stop the Management Agent.

  3. Set AgentListenOnAllNICs=false in the $<AGENT_HOME>/sysman/config/emd.properties file. Ensure that you perform this step for both the Management Agents.

  4. Start up both the Management Agents.

If the Management Agent install fails, diagnose the problem by viewing the Management Agent install logs. For information on the location of these logs, see Manual Management Agent Installation Logs.

Response File Parameters for Installing a Remote Agent in Silent Mode Using the AgentPull Script

Table 6-3 describes the mandatory parameters that you must include, and the optional parameters that you can include in the response file, while installing a Remote Agent using the AgentPull script.

Table 7-2 Creating a Response File for Installing Remote Agent Using AgentPull Script

Parameter Description

LOGIN_USER

(Mandatory) Enter the Enterprise Manager console login user name.

For example, LOGIN_USER=sysman

LOGIN_PASSWORD

(Mandatory) Enter the Enterprise Manager console login password.

For example, LOGIN_PASSWORD=myuserpassword

PLATFORM

(Mandatory) Enter the platform for which you want to download the Management Agent software.

For example, PLATFORM="Linux x86-64"

Note: The value of this parameter must be in " ".

AGENT_REGISTRATION_PASSWORD

(Mandatory) Enter a password for registering new Management Agents that join the Enterprise Manager system.

By default, the communication between the OMS and the Management Agents is secured and locked. Any new Management Agents that join the Enterprise Manager system must be authenticated before they become part of the system. The password you enter here will be used for authenticating those new Management Agents.

For example, AGENT_REGISTRATION_PASSWORD=Wel456come

VERSION

(Optional) Enter the version of the Management Agent software you want to download.

For example, VERSION=24.1.0.0.0

If you do not specify this parameter, it is assigned the OMS version.

OMS_HOST

(Optional) Enter the OMS host name.

For example, OMS_HOST=example.com

EM_UPLOAD_PORT

(Optional) Enter the upload port (HTTP or HTTPS) for communicating with the OMS.

For example, EM_UPLOAD_PORT=14511

AGENT_INSTANCE_HOME

(Optional) Enter a directory location on the destination host where all Management Agent-related configuration files can be stored. For this parameter, you can do one of the following:

  • Leave it blank.

    In this case, by default, an instance directory titled agent_inst is created in the agent installation base directory.

    For example, if the installation base directory is /john/oracle/, then the instance directory is defaulted to /john/oracle/agent_inst

  • Enter the absolute path to a custom directory.

    Although you can enter any location as a custom location, Oracle recommends you to maintain the instance directory inside the installation base directory.

    For example, AGENT_INSTANCE_HOME=/u01/software/em24/agentbasedir/agent_inst

AGENT_PORT

(Optional) Enter a free port on which the Management Agent process should be started. The same port is used for both HTTP and HTTPS.

For example, AGENT_PORT=1832

If you do not enter any value, then either 3872 or any free port between 1830 and 1849 is honored.

START_AGENT

(Optional) Enter TRUE if you want the Management Agent to start automatically once it is installed and configured. Otherwise, enter FALSE.

For example, START_AGENT=TRUE

If you do not include this parameter, it defaults to TRUE.

ORACLE_HOSTNAME

(Optional) Enter the fully qualified domain name of the host where you want to install the Management Agent.

For example, ORACLE_HOSTNAME=example.com

If you do not include this parameter, it defaults to the physical host name.

ALLOW_IPADDRESS

(Optional) Enter TRUE if you want to specify an IP address for ORACLE_HOSTNAME. If ALLOW_IPADDRESS is set to FALSE, a prerequisite check fails when you specify an IP address for ORACLE_HOSTNAME while installing a Management Agent.

For example, ALLOW_IPADDRESS=TRUE

If you do not include this parameter, it defaults to FALSE.

INVENTORY_LOCATION

(Optional) Enter the custom inventory location.

PROPERTIES_FILE

(Optional) Use this parameter to specify the absolute location of the properties file.

For example, PROPERTIES_FILE=/tmp/agent.properties

In the properties file, specify the parameters that you want to use for the Management Agent deployment. The list of parameters that you can specify in the properties file is present in $<AGENT_INSTANCE_HOME>/sysman/config/emd.properties. In the properties file, you must specify the parameters in name value pairs, for example:

REPOSITORY_PROXYHOST=abc.example.com

REPOSITORY_PROXYPORT=1532

The properties file does not support parameter values that have spaces. If the value of a particular parameter contains a space, then run the following command after deploying the Management Agent:

$<AGENT_INSTANCE_HOME>/bin/emctl setproperty agent -name <parameter_name> -value <parameter_value>

Access Permission

Add write permission to the agent.rsp file

Remote Agent Use this parameter if installing a Remote Agent. For example:

REMOTE_AGENT=true

After Installing a Remote Agent in Silent Mode

For information, see Performing Postinstallation Tasks for Remote Agentsin the Oracle Enterprise Manager Basic Installation Guide.