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

  1. Before installing, see Install the Machine Agent.

    Read/write privileges to the <machine-agent-home> installation directory are required.

  2. Download and unzip the Agent zip bundle. From the command line, enter:  

    unzip <zip-bundle.zip> -d <machine_agent_home>
    CODE

    where <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.

  3. 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.

    1. (Required) Configure the Controller host name, port number, and account access key. 
    2. (Optional) Review memory requirements. See Machine Agent Requirements and Supported Environments.
    3. (Optional) Configure the agent to use SSL. See Enable SSL for Machine Agent.
    4. (Optional) Configure the agent to use proxy settings. See Machine Agent Configuration Properties.
    5. (Required for Multi-Tenant Mode or SaaS installations) Configure the Agent Account Information. See Multi-Tenant Controller Accounts.
    6. (Optional) Determine if you need to specify an application name and tier name. See Machine Agents and Applications.
      I
      f you are installing the Machine Agent on the same server with any APM app agent, do not specify application name and tier name. 
  4. To add the Machine Agent as a service, see Add the Agent as a Service.
  5. 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
  6. (Optional) Verify the installation. See Verify the Machine Agent Installation.

Add the Agent as a Service Using SysV

  1. Install the Machine Agent.
  2. Create a link to /etc/sysconfig

    ln -s <machine-agent-home>/etc/sysconfig/appdynamics-machine-agent /etc/sysconfig/appdynamics-machine-agent
    CODE
  3. Copy 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
  4. 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.
  5. Add the agent as a service. For example, enter:

    chkconfig --add appdynamics-machine-agent


    For Ubuntu, you can use update-rc.d or sysv-rc-conf. See the Ubuntu documentation for details.

  6. Start the agent service: service appdynamics-machine-agent start. 

  7. 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

  1. Install the Machine Agent.
  2. Edit the environment variables and options in the service file as needed: <machine-agent-home>/etc/systemd/system/appdynamics-machine-agent.service

    1. MACHINE_AGENT_HOME – Specifies where the Machine Agent files are located.
    2. 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
    3. 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 .
      The systemd service file does not include the "MACHINE_AGENT_USER" variable.
  3. Copy the file:

    cp <machine-agent-home>/etc/systemd/system/appdynamics-machine-agent.service \
    /etc/systemd/system/appdynamics-machine-agent.service
  4. Enable the Machine Agent to start at system startup:

    systemctl enable appdynamics-machine-agent
  5. Start the agent service:

    systemctl start appdynamics-machine-agent 
  6. Check the service status:

    systemctl status appdynamics-machine-agent
  7. Verify that the Agent is reporting to the Controller. See .Linux Install Using ZIP with Bundled JRE v22.1.