Linux Install Using the RPM Package
This page describes how to install the Machine Agent on Linux systems that support the RPM Package Manager:
- CentOS
- RHEL
- Fedora
- openSUSE
-
SUSE Linux Enterprise Server
- AARCH
For Linux systems that do not support RPM, use the JRE Bundled Zip Archive.
The RPM installer makes these changes to the host machine:
- Creates an
appdynamicsgroup and anappdynamicsuser - Assigns ownership of certain files in the machine-agent directory to the
appdynamicsuser
These changes are necessary to enable non-root users to configure and run an RPM-installed agent. To use a different user or group for the machine agent service, set the MACHINE_AGENT_USER and MACHINE_AGENT_GROUP environment variables in a shell for RPM installation.
sudo MACHINE_AGENT_USER=myuser MACHINE_AGENT_GROUP=mygroup rpm -ivh appdynamics-machine-agent.rpm
If the specified user or group does not exist, an error message appears and the RPM installation stops. To continue, you must define users and groups.If this is an issue in your environment, then you install the agent using the ZIP archive (see Linux Install Using ZIP with Bundled JRE).
Install the Machine Agent
RPM Package Function
The RPM package manager installs the agent files to opt/appdynamics/machine-agent, creates symbolic links, sets environment variables, and adds the agent as a service.
Symbolic Links
The RPM package manager creates the symbolic links to agent scripts and configuration files in the /etc directory. You can edit these links to accommodate a different installation directory, JRE, or system user account running the agent.
Link for SysV Service Script
/etc/init.d/appdynamics-machine-agent >> /opt/appdynamics/machine-agent/etc/init.d/appdynamics-machine-agent
This script provides these service commands:
Start: Starts the service, runs a script that starts the agentStop: Stops the serviceRestart: Restarts the serviceStatus: Returns the status of the service.
For example: service appdynamics-machine-agent start
Link for Environment Variables
SysV -
/etc/sysconfig/appdynamics-machine-agent >> /opt/appdynamics/machine-agent/etc/sysconfig/appdynamics-machine-agent
This script sets up the environment variables:
MACHINE_AGENT_HOME=/opt/appdynamics/machine-agent: Specifies where the agent files are located.JAVA_HOME=/opt/appdynamics/machine-agent/jre: Specifies the JRE the agent uses. We recommend that you use the RPM package installer that contains its own JRE. However, you can use a different JRE as long as it meets the JRE requirements.MACHINE_AGENT_USER=root: Specifies the system user for starting the agent (default is root). We recommend that you create a non-root user to run the machine agent. The new user needs to have read-access to controller-info.xml and write access to the log file. See Permissions Required to Run the Machine Agent.
systemd: The environment variables are in the service file:
/etc/systemd/system/appdynamics-machine-agent.service >> /opt/appdynamics/machine-agent/etc/systemd/system/appdynamics-machine-agent.service
Link for Agent to Controller Communication
Sets up a link to the controller-info.xml file containing the properties for agent-to-controller communication.
/etc/appdynamics/machine-agent/controller-info.xml >> /opt/appdynamics/machine-agent/conf/controller-info.xml
Logging Configuration
The log4j.xml file controls the detail of information logged by the agent. By default, the logging level is set to info
/etc/appdynamics/machine-agent/logging/log4j.xml >> /opt/appdynamics/machine-agent/conf/logging/log4j.xml
Adds the Agent as a Service
After the package is installed, the appdynamics-machine-agent runs opt/appdynamics/machine-agent/bin/postInstall.sh to add the agent to the services. The installer either copies the SysV script to add the service or, if systemd is detected, the installer copies the agent unit file /etc/systemd/system/appdynamics-machine-agent.service and adds the agent to the services using this unit file.
Installs a systemd Unit File for the Agent Service
If systemcd is detected on the system when you install the RPM package or run the postinstall.sh script, the systemd unit file for the agent service is copied to the following location: /etc/systemd/system/appdynamics-machine-agent.service
ExecStart: This option in the systemd service file points to a script that starts the agent as a daemon. If you did not install the Machine Agent in /opt/appdynamics/machine-agent, then change the path to <machine-agent-home>/scripts/machine-agent-daemon. If you did not edit the path, then it points to the correct place by default.
You can start and stop the agent service using the relevant systemctl commands. For information on all systemctl commands, see the systemctlman pages.
| Command | Format |
|---|---|
|
start stop status restart |
|
|
disable enable (Use the full path) |
|
Linux RPM management for the Combined Agent on systemd
Install and manage the Machine Agent and the bundled OpenTelemetry Collector on Linux systems that use RPM and systemd.
This procedure applies to RPM installations that use systemd. The bundled collector is not an independently managed RPM service on SysV installations. Do not apply the collector service commands or deployment-mode guidance in this task to SysV installations.
Starting with Machine Agent 26.3.0, supported RPM packages include the Splunk Distribution of the OpenTelemetry Collector. On RPM installations that use systemd, the Machine Agent and collector run as independent services:
-
appdynamics-machine-agent.service -
splunk-otel-collector.service
Starting with Machine Agent 26.8.0, a fresh RPM installation installs and prepares the collector binary and service unit but leaves splunk-otel-collector.service disabled and inactive. Installing or starting the Machine Agent does not start the collector.
During an RPM upgrade, the installer preserves the existing collector service state. An enabled service remains enabled, a disabled service remains disabled, a running service is not stopped, and a stopped service is not started. The collector is not restarted automatically. Updated binaries and merged configuration take effect after an operator-approved restart.
By default, both services use the appdynamics account. MACHINE_AGENT_USER and MACHINE_AGENT_GROUP customize only the Machine Agent service. The packaged splunk-otel-collector.service continues to run as appdynamics.
For the supported Machine Agent RPM/systemd Dual signal workflow, use the default appdynamics account. A mixed-account configuration is not validated or supported.
The Machine Agent and, when selected, the bundled OpenTelemetry Collector are configured as independent systemd services. Verify the service state and review the Machine Agent log after applying configuration changes or running remediation actions.