Installing the Agent (Linux)

Scenarios

This topic describes how to manually install the Agent on a Linux ECS or BMS.

Constraints

Only Windows and Linux OSs are supported. For details, see What OSs Does the Agent Support?

For servers created from CentOS images, versions 7.2 through 7.6, you can click Not installed in the Agent Status column of the Server Monitoring page to install the Agent with one click.

Prerequisites

Procedure

  1. Log in to the ECS or BMS as user root.
  2. Run the following command to install the Agent:

    The script supports x86 and Kunpeng Arm-based ECSs.

    CN North-Beijing1:

    cd /usr/local && curl -k -O https://obs.cn-north-1.myhuaweicloud.com/uniagent-cn-north-1/script/agent_install.sh && bash agent_install.sh

    CN North-Beijing4:

    cd /usr/local && curl -k -O https://obs.cn-north-4.myhuaweicloud.com/uniagent-cn-north-4/script/agent_install.sh && bash agent_install.sh

    CN South-Guangzhou:

    cd /usr/local && curl -k -O https://obs.cn-south-1.myhuaweicloud.com/uniagent-cn-south-1/script/agent_install.sh && bash agent_install.sh

    CN South-Shenzhen:

    cd /usr/local && curl -k -O https://obs.cn-south-2.myhuaweicloud.com/uniagent-cn-south-2/script/agent_install.sh && bash agent_install.sh

    CN East-Shanghai1:

    cd /usr/local && curl -k -O  https://obs.cn-east-3.myhuaweicloud.com/uniagent-cn-east-3/script/agent_install.sh && bash agent_install.sh

    CN East-Shanghai2:

    cd /usr/local && curl -k -O https://obs.cn-east-2.myhuaweicloud.com/uniagent-cn-east-2/script/agent_install.sh && bash agent_install.sh

    CN Southwest-Guiyang1:

    cd /usr/local && curl -k -O https://obs.cn-southwest-2.myhuaweicloud.com/uniagent-cn-southwest-2/script/agent_install.sh && bash agent_install.sh

    AP-Hong-Kong:

    cd /usr/local && curl -k -O https://obs.ap-southeast-1.myhuaweicloud.com/uniagent-ap-southeast-1/script/agent_install.sh && bash agent_install.sh

    AP-Bangkok:

    cd /usr/local && curl -k -O https://obs.ap-southeast-2.myhuaweicloud.com/uniagent-ap-southeast-2/script/agent_install.sh && bash agent_install.sh

    AP-Singapore:

    cd /usr/local && curl -k -O https://obs.ap-southeast-3.myhuaweicloud.com/uniagent-ap-southeast-3/script/agent_install.sh && bash agent_install.sh

    AF-Johannesburg:

    cd /usr/local && curl -k -O https://obs.af-south-1.myhuaweicloud.com/uniagent-af-south-1/script/agent_install.sh && bash agent_install.sh

    LA-Santiago:

    cd /usr/local && wget https://telescope-la-south-2.obs.la-south-2.myhuaweicloud.com/scripts/agentInstall.sh && chmod 755 agentInstall.sh && ./agentInstall.sh

    LA-Sao Paulo1:

    cd /usr/local && wget https://telescope-sa-brazil-1.obs.sa-brazil-1.myhuaweicloud.com/scripts/agentInstall.sh && chmod 755 agentInstall.sh && ./agentInstall.sh
    The Agent is installed if the command output in Figure 1 is displayed.
    Figure 1 Successful installation
  3. Configure the Agent by following the procedure in Restoring the Agent Configurations (Linux) or (Optional) Manually Configuring the Agent (Linux).
  4. Run the following command to clear the installation script:

    if [[ -f /usr/local/uniagent/extension/install/telescope/bin/telescope ]]; then rm /usr/local/agent_install.sh; else rm /usr/local/agentInstall.sh; fi