On-premises Linux

This section describes the steps to set up the Oracle Management Agent and deploy the JMS plug-ins on an on-premises Linux host using the installation script.

Prerequisites:

Run the installation script with sudo or administrative access.

Note

By default, the installation script will:
  • Create or update Java Usage Tracker properties file with additional functionality to collect the user.name property for better identification of applications running on Application Servers like WebLogic and Tomcat. If you do not want to enable this feature, run the installation script with --enable-user-name=false argument. You can modify the Java Usage Tracker properties file in the future to add or remove user.name from the additionalProperties section.
  • Disable Federal Information Processing Standards (FIPS) mode for plug-ins.

    The plug-in reads the system environment variable ENV_AGENT_PLUGIN_FIPS_APPROVED and if it is found, enable FIPS mode for plug-ins. USGov relams, To create or modify this variable,run the installation script with --enable-fips-mode=true argument.

  • Install the agent with MACS default telemetry frequency.

Run the --help command to view the description of options such as enabling or disabling user name, proxy settings, FIPS, and so on.

The following are the optional parameters along with the description:

-u, --uninstall               Uninstall plug-ins, delete configuration files or restore originals from backups and exit.
-r, --reinstall               Uninstall plug-ins, delete configuration files or restore originals from backups and continue installation.
-h, --help                    Print usage message end exit.
--diagnostic                  Determine if prerequisite conditions are met on the host machine to allow successful 
                              agent installation and plug-in deployment.
--enable-user-name            Generate usage tracker with additional functionality to collect the 'user.name' property for better identification 
                              of applications running on Application Servers like WebLogic and Tomcat servers. 
                              Default value is 'true'. 
--enable-fips-mode            Enable FIPS mode for plug-ins in USGov realms.
                              Format is --enable-fips-mode=true|false (for example, --enable-fips-mode=false).
                              Modify /etc/environment and create a line with ENV_AGENT_PLUGIN_FIPS_APPROVED=true or false.
                              Default value is false.
--install-management-agent    Installation of OMA on the OCI compute instance.                               
--uninstall-management-agent  Uninstallation of OMA on the OCI compute instance.                                
--reinstall-management-agent  Force OMA installation on the OCI compute instance and remove existing OMA.                               
--ignore-unsupported          The setup will proceed on an unsupported platform. 
                              Installation might be successful, but not all functionality might work as intended.
--proxy-host                  Add proxy host to curl commands, add or replace line 'ProxyHost = VALUE' in install key before Management Agent setup.
                              Format is --proxy-host="VALUE" (for example, --proxy-host="100.0.0.10").
                              Default is no proxy.
--proxy-port                  Add proxy port to curl commands, add or replace line 'ProxyPort = VALUE' in install key before Management Agent setup.
                              Format is --proxy-port="VALUE" (for example, --proxy-port="8050").
--proxy-user                  Add proxy user to curl commands, add or replace line 'ProxyUser = VALUE' in install key before Management Agent setup.
                              Format is --proxy-user="VALUE" (for example, --proxy-user="opc").
--proxy-password              Add proxy password to curl commands, add or replace line 'ProxyPassword = VALUE' in install key before Management Agent setup.
                              Format is --proxy-password="VALUE" (for example, --proxy-password="example").
--proxy-realm                 Add or replace line 'ProxyRealm = VALUE' in install key before Management  Agent setup.
                              Format is --proxy-realm="VALUE" (for example, --proxy-realm="OC1").
--use-agent-installer-path    Path to management agent installation file if it isn't in the same folder as the install script.
--use-java-path               Specify the Oracle Java 8 installation path for agent installation.  
                              If the path is not specified, the script will attempt to find a suitable Oracle Java 8 installation path from the file system. 
                              Format is --use-java-path={CUSTOM_PATH}(for example, --use-java-path=/usr/java/jdk1.8.0_361)).     

Steps

  1. (Optional diagnostic check) Navigate to the folder where you saved the installation script and management agent software. Run the script using the following command:
    $ sudo bash ./JMS_YourFleetName_linux.sh --diagnostic
    Depending on the operating system and agent type, the results will be similar to:

    Diagnostic failed:

    ======================================================================================================
    Diagnostic Summary
    ======================================================================================================
    Shell is supported? : Yes
    User has sudo/root privileges? : Yes
    Certified OS? : Yes
    Meets minimum disk requirements? : Yes
    Meets minimum memory requirements? : Yes
    Able to reach OCI https://oracle.com endpoint? : Yes
    Meets Java requirement? : Yes
    Valid Management Agent installer? : No    
       Found 2 files with 'oracle.mgmt_agent*.rpm' pattern in /home/opc folder.    
       Please, run script test_linux.sh again with --use-agent-installer-path parameter.
    Management Agent has been detected? : No
    ======================================================================================================
    Diagnostics have failed. Please resolve all issues and run script test_linux.sh again.
    Diagnostic completed successfully:
    ======================================================================================================
    Diagnostic Summary
    ======================================================================================================
    Shell is supported? : Yes
    User has sudo/root privileges? : Yes
    Certified OS? : Yes
    Meets minimum disk requirements? : Yes
    Meets minimum memory requirements? : Yes
    Able to reach OCI https://oracle.com endpoint? : Yes
    Meets Java requirement? : Yes
    Valid Management Agent installer? : Yes
    Existing Management Agent has been detected? : Yes
    Existing Management Agent has JMS plugins? : Yes
    Existing Management Agent can be upgraded? : Yes
    ======================================================================================================
    Diagnostics have finished running and no error occurred.

    See Running Agent Installation Diagnostics for the complete list of question with solutions or recommendations.

  2. Go to the folder where you saved the installation script and management agent software. Run the script using the following command:
    $ sudo bash ./JMS_YourFleetName_linux.sh
    • If installation is successful, you'll see a message similar to the following:
      ...
      Management Agent installation has been completed.
      Management Agent plugin 'Java Management Service' installation has been completed.
      Management Agent plugin 'Java Usage Tracking' installation has been completed.
      Management Agent was successfully registered using key YourFleetName (ocid1.managementagentinstallkey.oc1.iad.<ocid hash>).Assigned JMS Fleet is YourFleetName (ocid1.jmsfleet.oc1.iad.<ocid hash>).
    • In case the agent is already installed, the script will update the agent software to the latest version, if applicable. If JMS plug-ins are not deployed yet, deploy Java Usage Tracking and Java Management Service plug-ins manually as described in the Deploy a Service Plug-in Using the Agents Page. Or, you can reinstall the agent along with JMS plug-in deployment; run the script with the --force parameter.
  3. (Optional) To verify if the management agent is running, type:
    $ sudo systemctl status mgmt_agent
    The results will show:
    mgmt_agent.service - mgmt_agent
       Loaded: loaded (/etc/systemd/system/mgmt_agent.service; enabled; vendor preset: disabled)
       Active: active (running) since Wed 2022-08-24 07:05:38 GMT; 24s ago
      Process: 1772 ExecStart=/opt/oracle/mgmt_agent/agent_inst/bin/agentcore start sysd (code=exited, status=0/SUCCESS)
     Main PID: 1864 (wrapper)
       Memory: 414.6M
       CGroup: /system.slice/mgmt_agent.service
               ├─1864 /opt/oracle/mgmt_agent/agent_inst/bin/./wrapper /opt/oracle/mgmt_agent/agent_inst/bin/../config/wrapper.conf wrapper.syslog.ident=mgmt_agent wrapper.pidfile=/opt/oracle/mgmt_agent/agent_inst/bin/../log...
               └─2171 /usr/java/jdk1.8.0_301-amd64/bin/java -Dorg.tanukisoftware.wrapper.WrapperSimpleApp.maxStartMainWait=5 -Djava.security.egd=file:///dev/./urandom -XX:+HeapDumpOnOutOfMemoryError -Dpolyglot.engine.AllowE...
    
    Aug 24 07:05:21 name-agent-stage systemd[1]: Starting mgmt_agent...
    Aug 24 07:05:21 name-agent-stage agentcore[1772]: Removed stale pid file: /opt/oracle/mgmt_agent/agent_inst/bin/../log/mgmt_agent.pid
    Aug 24 07:05:21 name-agent-stage agentcore[1772]: Starting mgmt_agent...
    Aug 24 07:05:33 name-agent-stage agentcore[1772]: Waiting for mgmt_agent..............
    Aug 24 07:05:34 name-agent-stage sudo[2752]: mgmt_agent : TTY=unknown ; PWD=/opt/oracle/mgmt_agent/agent_inst/bin ; USER=root ; ENV=ORACLE_CLOUD_AGENT_PLUGIN_COOKIE=<Cookie_ID> LOGDIR=/opt/or...
    Aug 24 07:05:38 name-agent-stage systemd[1]: Started mgmt_agent. 

    You can also view the console to verify if the management agent is running. See Management Agents Console Overview for more information.

    The log files are located in the /opt/oracle/mgmt_agent/plugins/jm/stateDir/log directory.