Skip to main content
Version: 3.7.0

Install SmartAgent on Linux as root User

Overview

This document describes how to install SmartAgent on a Linux system as the root user.

info

If you do not have root privileges, please refer to the Non-root Installation.


Prerequisites

Before installation, make sure the following conditions are met:


Installation & Upgrade

  1. Log in to the Bonree ONE platform, go to Configuration > Agent Installation, and select Host Mode as the deployment mode.

  2. Download the latest SmartAgent-Linux installation package for your CPU architecture:

    wget -O Bonree-SmartAgent-Linux-<version>.sh \
    'https://one.bonree.com/agent/down/Bonree-SmartAgent-Linux-<version>.sh' \
    --header='Authorization:<token>'
  3. Run the installation command and set parameters as needed (detailed installation parameters):

    /bin/sh Bonree-SmartAgent-Linux-<version>.sh config \
    -a "<accountGUID>" \
    -u "https://oneupload.bonree.com/APM" \
    -t "java,php,go,dotnet" \
    -l "https://oneupload.bonree.com/controller/logs" \
    --set-env-id "default"

Verify Installation

  1. Check whether the process started successfully:

    ps -ef | grep bonree/apm
  2. Confirm communication with the platform via logs:

    tail -f /opt/bonree/apm/logs/machine/machine.log
  3. Restart the applications to be monitored to ensure the agent takes effect.


Service Management

  1. CentOS 7+ (Systemd)

    # Start
    systemctl start bonree-agent
    # Stop
    systemctl stop bonree-agent
    # Restart
    systemctl restart bonree-agent
  2. CentOS 6 and below (SysV)

    # Start
    service bonree-agent start
    # Stop
    service bonree-agent stop
    # Restart
    service bonree-agent restart
  3. Non-root User

    If installed with Non-root Run Mode, you can manage the agent service with the specified user:

    # Start
    /opt/bonree/apm/bin/agentconfig --start-service
    # Stop
    /opt/bonree/apm/bin/agentconfig --stop-service
    # Restart
    /opt/bonree/apm/bin/agentconfig --restart-service

Uninstallation

sudo bash /opt/bonree/apm/scripts/uninstall.sh
warning

After uninstallation, do not immediately delete the agent directory until all monitored applications or containers have been restarted, otherwise business issues may occur.