On-premises Linux
This section describes the steps to run the downloaded script on an on-premise host
running on Linux platform. The script will install Oracle Management Agent on the host.
Prerequisites:
Run the installation script with sudo
or administrative access.
Steps
- 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.
Note
By default, the installation script will:- 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. If you do not want to enable this feature, update the parameter--enable-user-name=false
in the installation script. You can modify the Java Usage Tracker properties file in the future to add or removeuser.name
from theadditionalProperties
section. - Disable Federal Information Processing Standards (FIPS) mode for
plug-ins. To enable FIPS mode in USGov relams, update the parameter
--enable-fips-mode=true
in the installation script. - 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:-c, --cleanup Uninstall plug-ins, delete configuration files or restore originals from backups and exit. -f, --force Uninstall plug-ins, delete configuration files or restore originals from backups and continue installation. -h, --help Print usage message end exit. --enable-user-name Generates 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-mgmt-agent Force Management Agent installation on instance. Use this parameter to monitor an OCI instance belonging to a different tenancy or region. --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)).
- If installation is successful, you'll see a message similar to the following:
- (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.