Download PDF
Download page Linux Install Using ZIP with Bundled JRE.
Linux Install Using ZIP with Bundled JRE
This page describes how to install the Machine Agent using the Linux ZIP archive that includes JRE 1.8.
It is easier to download and use the RPM package if your Linux distribution supports the RPM Package Manager.
Install the Agent
Before installing, see Install the Machine Agent.
Read/write privileges to the <machine-agent-home> installation directory are required.
Download and unzip the Agent zip bundle. From the command line, enter:
unzip <zip-bundle.zip> -d <machine_agent_home>
CODEwhere <zip-bundle.zip> is the name of the zip archive for your environment and <agent_home> is the name of the directory where you want to install the agent.
Gather your configuration details and configure the agent by editing<machine_agent_home>/conf/controller-info.xml file or by adding system properties to the JVM startup script file. See .Linux Install Using ZIP with Bundled JRE v22.1.
- (Required) Configure the Controller host name, port number, and account access key.
- (Optional) Review memory requirements. See Machine Agent Requirements and Supported Environments.
- (Optional) Configure the agent to use SSL. See Enable SSL for Machine Agent.
- (Optional) Configure the agent to use proxy settings. See Machine Agent Configuration Properties.
- (Required for Multi-Tenant Mode or SaaS installations) Configure the Agent Account Information. See Multi-Tenant Controller Accounts.
- (Optional) Determine if you need to specify an application name and tier name. See Machine Agents and Applications.
If you are installing the Machine Agent on the same server with any APM app agent, do not specify application name and tier name.
- To add the Machine Agent as a service, see Add the Agent as a Service.
Start the Machine Agent by entering:
<machine_agent_home>/bin/machine-agent
. For example, from the <machine_agent_home> directory:./bin/machine-agent
To review Machine Agent usage, enter:
machine-agent -h
Usage: machine-agent [-dh] [-j JAVA_HOME] [-p pidfile] [-D prop] [-X prop] Start the machine agent. -d daemonize (run in background) -p pidfile write PID to <pidfile> -h --help print command line options -D prop set JAVA system property -X prop set non-standard JAVA system property
(Optional) Verify the installation. See Verify the Machine Agent Installation.
Add the Agent as a Service Using SysV
- Install the Machine Agent.
Create a link to
/etc/sysconfig
:ln -s <machine-agent-home>/etc/sysconfig/appdynamics-machine-agent /etc/sysconfig/appdynamics-machine-agent
CODECopy the machine agent to
/etc/init.d
. For example:cp <machine-agent-home>/etc/init.d/appdynamics-machine-agent /etc/init.d/appdynamics-machine-agent
Edit the environment variables in
/etc/sysconfig/appdynamics-machine-agent
configuration file:- MACHINE_AGENT_HOME – Specifies where the Machine Agent files are located.
- JAVA_HOME – Specifies the JRE the agent uses. AppDynamics recommends that you use the Machine Agent bundled with the JRE. However, you can use an existing JRE. (1.8 or later).
- MACHINE_AGENT_USER – Specifies the system user used to start the Machine Agent. By default this is root. AppDynamics recommends 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.
Add the agent as a service. For example, enter:
chkconfig --add appdynamics-machine-agent
For Ubuntu, you can useupdate-rc.d
orsysv-rc-conf
. See the Ubuntu documentation for details.Start the agent service:
service appdynamics-machine-agent start
.
Verify that the Agent is reporting to the Controller. See .Linux Install Using ZIP with Bundled JRE v22.1.
Add the Agent as a Service Using systemd
- Install the Machine Agent.
Edit the environment variables and options in the service file as needed:
<machine-agent-home>/etc/systemd/system/appdynamics-machine-agent.service
- MACHINE_AGENT_HOME – Specifies where the Machine Agent files are located.
- JAVA_HOME – Specifies the JRE the agent uses. Appdynamics recommends that you use the Machine Agent bundled with the JRE. However, you can use an existing JRE.
– JRE >= 1.7 for = 4.3
– JRE >= 1.8 for >= 4.4 - User – This option in the service file specifies the system user to use to start the Machine Agent. By default this is root. AppDynamics recommends 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 files. See Permissions for Non-Root User to Run the Machine Agent .
Thesystemd
service file does not include the "MACHINE_AGENT_USER" variable.
Copy the file:
cp <machine-agent-home>/etc/systemd/system/appdynamics-machine-agent.service \ /etc/systemd/system/appdynamics-machine-agent.service
Enable the Machine Agent to start at system startup:
systemctl enable appdynamics-machine-agent
Start the agent service:
systemctl start appdynamics-machine-agent
Check the service status:
systemctl status appdynamics-machine-agent
- Verify that the Agent is reporting to the Controller. See .Linux Install Using ZIP with Bundled JRE v22.1.