This topic describes how to install, upgrade, and uninstall Logtail on a Linux server.

Prerequisites

  • At least one Linux server is available.
  • The type of the network that is required to collect logs is determined. You can determine the network type based on the type of the server on which you want to install Logtail and the region where the server resides. For more information, see Select a network type.

Supported operating systems

You can install Logtail on servers that run one of the following x86-64 Linux operating systems:
  • Aliyun Linux 2
  • Red Hat Enterprise Linux 6, Red Hat Enterprise Linux 7, and Red Hat Enterprise Linux 8
  • CentOS Linux 6, CentOS Linux 7, and CentOS Linux 8
  • Debian GNU/Linux 8, Debian GNU/Linux 9, and Debian GNU/Linux 10
  • Ubuntu 14.04, Ubuntu 16.04, Ubuntu 18.04, and Ubuntu 20.04
  • SUSE Linux Enterprise Server 11, SUSE Linux Enterprise Server 12, and SUSE Linux Enterprise Server 15
  • openSUSE Leap 15.1, openSUSE Leap 15.2, and openSUSE Leap 42.3
  • Glibc 2.5 or later

Precautions

  • The installation command in this topic is applicable to Logtail V0.16.x. If you want to install Logtail V1.0 or upgrade the Logtail version to Logtail V1.0, you must add the version number to the installation or upgrade command. For example, to install Logtail V1.0, run the ./logtail.sh install cn-hangzhou -v v1 command. To upgrade the Logtail version to V1.0, run the sudo ./logtail.sh upgrade -v v1 command.
  • If you run the installation command on a server on which Logtail is installed, the installer uninstalls Logtail from the server, deletes the /usr/local/ilogtail directory, and then reinstalls Logtail. If the installation is successful, Logtail starts when the system reboots.
  • If the installation fails, submit a ticket.
  • If you install Logtail on an Elastic Compute Service (ECS) instance that resides in the classic network and then change the network type to Virtual Private Cloud (VPC), you must update the Logtail configuration. For more information, see Do I need to update Logtail settings after the network type is changed?.

Installation methods

The installation command varies based on the network type of the server on which you want to install Logtail.
Before you run the installation command, replace the ${your_region_name} variable in the command with the value for the region where the project resides. The following table describes the value of ${your_region_name} for each region.
Table 1. Region names for Logtail installation
Region ${your_region_name} Region ${your_region_name}
China (Hangzhou) cn-hangzhou US (Virginia) us-east-1
China (Shanghai) cn-shanghai Singapore (Singapore) ap-southeast-1
China (Qingdao) cn-qingdao Australia (Sydney) ap-southeast-2
China (Beijing) cn-beijing Malaysia (Kuala Lumpur) ap-southeast-3
China (Zhangjiakou) cn-zhangjiakou Indonesia (Jakarta) ap-southeast-5
China (Hohhot) cn-huhehaote India (Mumbai) ap-south-1
China (Ulanqab) cn-wulanchabu Japan (Tokyo) ap-northeast-1
China (Shenzhen) cn-shenzhen Germany (Frankfurt) eu-central-1
China (Heyuan) cn-heyuan UAE (Dubai) me-east-1
China (Guangzhou) cn-guangzhou UK (London) eu-west-1
China (Chengdu) cn-chengdu N/A N/A
China (Hong Kong) cn-hongkong N/A N/A
Russia (Moscow) rus-west-1 N/A N/A
US (Silicon Valley) us-west-1 N/A N/A

Install Logtail over the Alibaba Cloud internal network

  • If you cannot identify the region where the ECS instance resides, you can use the auto parameter in the Logtail installation script to install Logtail.
    After you specify the auto parameter in the installation command, the Logtail installation script obtains and uses the metadata of the ECS instance to identify the region where the ECS instance resides. For more information about the metadata of the ECS instance, see Overview of ECS instance metadata.
    1. Download the Logtail installation script over the Internet.

      The download consumes approximately 10 KB of Internet traffic.

      wget http://logtail-release-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh;chmod 755 logtail.sh
    2. Install Logtail by using the auto parameter.

      If you run the following command in PowerShell or Command Prompt, the Logtail installation package of the region is automatically downloaded. This download does not consume Internet traffic.

      ./logtail.sh install auto
  • If you can identify the region where the ECS instance resides, you can specify the region in the installation command.
    Download the Logtail installation script over the internal network. This download does not consume Internet traffic.
    1. Obtain the value of ${your_region_name} for the region where the Log Service project resides.

      For more information about the value of ${your_region_name} for each region, see Table 1. For example, the value of ${your_region_name} for the China (Hangzhou) region is cn-hangzhou.

    2. Replace the ${your_region_name} variable in the command with the value for the region where the project resides, and then run the installation command.
      wget http://logtail-release-${your_region_name}.oss-${your_region_name}-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ${your_region_name}
    The following table describes the installation command that corresponds to each region where the Log Service project resides.
    Region Installation command
    China (Hangzhou)
    wget http://logtail-release-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-hangzhou
    China (Shanghai)
    wget http://logtail-release-cn-shanghai.oss-cn-shanghai-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-shanghai
    China (Qingdao)
    wget http://logtail-release-cn-qingdao.oss-cn-qingdao-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-qingdao
    China (Beijing)
    wget http://logtail-release-cn-beijing.oss-cn-beijing-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-beijing
    China (Zhangjiakou)
    wget http://logtail-release-cn-zhangjiakou.oss-cn-zhangjiakou-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-zhangjiakou
    China (Hohhot)
    wget http://logtail-release-cn-huhehaote.oss-cn-huhehaote-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-huhehaote
    China (Ulanqab)
    wget http://logtail-release-cn-wulanchabu.oss-cn-wulanchabu-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-wulanchabu
    China (Shenzhen)
    wget http://logtail-release-cn-shenzhen.oss-cn-shenzhen-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-shenzhen
    China (Heyuan)
    wget http://logtail-release-cn-heyuan.oss-cn-heyuan-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-heyuan
    China (Guangzhou)
    wget http://logtail-release-cn-guangzhou.oss-cn-guangzhou-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-guangzhou
    China (Chengdu)
    wget http://logtail-release-cn-chengdu.oss-cn-chengdu-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-chengdu
    China (Hong Kong)
    wget http://logtail-release-cn-hongkong.oss-cn-hongkong-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-hongkong
    US (Silicon Valley)
    wget http://logtail-release-us-west-1.oss-us-west-1-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install us-west-1
    US (Virginia)
    wget http://logtail-release-us-east-1.oss-us-east-1-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install us-east-1
    Singapore (Singapore)
    wget http://logtail-release-ap-southeast-1.oss-ap-southeast-1-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ap-southeast-1
    Australia (Sydney)
    wget http://logtail-release-ap-southeast-2.oss-ap-southeast-2-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ap-southeast-2
    Malaysia (Kuala Lumpur)
    wget http://logtail-release-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ap-southeast-3
    Indonesia (Jakarta)
    wget http://logtail-release-ap-southeast-5.oss-ap-southeast-5-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ap-southeast-5
    Japan (Tokyo)
    wget http://logtail-release-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ap-northeast-1
    India (Mumbai)
    wget http://logtail-release-ap-south-1.oss-ap-south-1-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ap-south-1
    Germany (Frankfurt)
    wget http://logtail-release-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install eu-central-1
    UAE (Dubai)
    wget http://logtail-release-me-east-1.oss-me-east-1-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install me-east-1
    UK (London)
    wget http://logtail-release-eu-west-1.oss-eu-west-1-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install eu-west-1
    Russia (Moscow)
    wget http://logtail-release-rus-west-1.oss-rus-west-1-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install rus-west-1

Install Logtail over the Internet

  1. Obtain the value of ${your_region_name} for the region where the Log Service project resides.

    For more information about the value of ${your_region_name} for each region, see Table 1. For example, the value of ${your_region_name} for the China (Hangzhou) region is cn-hangzhou.

  2. Replace the ${your_region_name} variable in the command with the value of the region where the project resides, and then run the installation command.
    wget http://logtail-release-${your_region_name}.oss-${your_region_name}.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ${your_region_name}-internet
The following table describes the installation command that corresponds to each region where the Log Service project resides.
Region Installation command
China (Hangzhou)
wget http://logtail-release-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-hangzhou-internet
China (Shanghai)
wget http://logtail-release-cn-shanghai.oss-cn-shanghai.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-shanghai-internet
China (Qingdao)
wget http://logtail-release-cn-qingdao.oss-cn-qingdao.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-qingdao-internet
China (Beijing)
wget http://logtail-release-cn-beijing.oss-cn-beijing.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-beijing-internet
China (Zhangjiakou)
wget http://logtail-release-cn-zhangjiakou.oss-cn-zhangjiakou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-zhangjiakou-internet
China (Hohhot)
wget http://logtail-release-cn-huhehaote.oss-cn-huhehaote.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-huhehaote-internet
China (Ulanqab)
wget http://logtail-release-cn-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-wulanchabu-internet
China (Shenzhen)
wget http://logtail-release-cn-shenzhen.oss-cn-shenzhen.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-shenzhen-internet
China (Heyuan)
wget http://logtail-release-cn-heyuan.oss-cn-heyuan.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-heyuan-internet
China (Guangzhou)
wget http://logtail-release-cn-guangzhou.oss-cn-guangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-guangzhou-internet
China (Chengdu)
wget http://logtail-release-cn-chengdu.oss-cn-chengdu.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-chengdu-internet
China (Hong Kong)
wget http://logtail-release-cn-hongkong.oss-cn-hongkong.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-hongkong-internet
US (Silicon Valley)
wget http://logtail-release-us-west-1.oss-us-west-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install us-west-1-internet
US (Virginia)
wget http://logtail-release-us-east-1.oss-us-east-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install us-east-1-internet
Singapore (Singapore)
wget http://logtail-release-ap-southeast-1.oss-ap-southeast-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ap-southeast-1-internet
Australia (Sydney)
wget http://logtail-release-ap-southeast-2.oss-ap-southeast-2.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ap-southeast-2-internet
Malaysia (Kuala Lumpur)
wget http://logtail-release-ap-southeast-3.oss-ap-southeast-3.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ap-southeast-3-internet
Indonesia (Jakarta)
wget http://logtail-release-ap-southeast-5.oss-ap-southeast-5.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ap-southeast-5-internet
Japan (Tokyo)
wget http://logtail-release-ap-northeast-1.oss-ap-northeast-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ap-northeast-1-internet
Germany (Frankfurt)
wget http://logtail-release-eu-central-1.oss-eu-central-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install eu-central-1-internet
UAE (Dubai)
wget http://logtail-release-me-east-1.oss-me-east-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install me-east-1-internet
India (Mumbai)
wget http://logtail-release-ap-south-1.oss-ap-south-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ap-south-1-internet
UK (London)
wget http://logtail-release-eu-west-1.oss-eu-west-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install eu-west-1-internet
Russia (Moscow)
wget http://logtail-release-rus-west-1.oss-rus-west-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install rus-west-1-internet

Install Logtail by using the global acceleration feature

  1. Obtain the value of ${your_region_name} for the region where the Log Service project resides.
    For more information about the value of ${your_region_name} for each region, see Table 1. For example, the value of ${your_region_name} for the China (Hangzhou) region is cn-hangzhou.
  2. Replace the ${your_region_name} variable in the command with the value for the region where the project resides, and then run the installation command.
    wget http://logtail-release-${your_region_name}.oss-${your_region_name}.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ${your_region_name}-acceleration
The following table describes the installation command that corresponds to each region where the Log Service project resides.
Region Installation command
China (Beijing)
wget http://logtail-release-cn-beijing.oss-cn-beijing.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-beijing-acceleration
China (Qingdao)
wget http://logtail-release-cn-qingdao.oss-cn-qingdao.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-qingdao-acceleration
China (Hangzhou)
wget http://logtail-release-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-hangzhou-acceleration
China (Shanghai)
wget http://logtail-release-cn-shanghai.oss-cn-shanghai.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-shanghai-acceleration
China (Shenzhen)
wget http://logtail-release-cn-shenzhen.oss-cn-shenzhen.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-shenzhen-acceleration
China (Heyuan)
wget http://logtail-release-cn-heyuan.oss-cn-heyuan.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-heyuan-acceleration
China (Guangzhou)
wget http://logtail-release-cn-guangzhou.oss-cn-guangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-guangzhou-acceleration
China (Zhangjiakou)
wget http://logtail-release-cn-zhangjiakou.oss-cn-zhangjiakou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-zhangjiakou-acceleration
China (Hohhot)
wget http://logtail-release-cn-huhehaote.oss-cn-huhehaote.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-huhehaote-acceleration
China (Ulanqab)
wget http://logtail-release-cn-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-wulanchabu-acceleration
China (Chengdu)
wget http://logtail-release-cn-chengdu.oss-cn-chengdu.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-chengdu-acceleration
China (Hong Kong)
wget http://logtail-release-cn-hongkong.oss-cn-hongkong.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install cn-hongkong-acceleration
US (Silicon Valley)
wget http://logtail-release-us-west-1.oss-us-west-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install us-west-1-acceleration
US (Virginia)
wget http://logtail-release-us-east-1.oss-us-east-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install us-east-1-acceleration
Singapore (Singapore)
wget http://logtail-release-ap-southeast-1.oss-ap-southeast-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ap-southeast-1-acceleration
Australia (Sydney)
wget http://logtail-release-ap-southeast-2.oss-ap-southeast-2.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ap-southeast-2-acceleration
Malaysia (Kuala Lumpur)
wget http://logtail-release-ap-southeast-3.oss-ap-southeast-3.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ap-southeast-3-acceleration
Indonesia (Jakarta)
wget http://logtail-release-ap-southeast-5.oss-ap-southeast-5.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ap-southeast-5-acceleration
Japan (Tokyo)
wget http://logtail-release-ap-northeast-1.oss-ap-northeast-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ap-northeast-1-acceleration
Germany (Frankfurt)
wget http://logtail-release-eu-central-1.oss-eu-central-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install eu-central-1-acceleration
UAE (Dubai)
wget http://logtail-release-me-east-1.oss-me-east-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install me-east-1-acceleration
India (Mumbai)
wget http://logtail-release-ap-south-1.oss-ap-south-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install ap-south-1-acceleration
UK (London)
wget http://logtail-release-eu-west-1.oss-eu-west-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install eu-west-1-acceleration
Russia (Moscow)
wget http://logtail-release-rus-west-1.oss-rus-west-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; ./logtail.sh install rus-west-1-acceleration

Install Logtail offline

  1. Log on to a server that can be accessed over the Internet.
  2. Replace the ${your_region_name} variable in the command with the value for the region where the project resides, and then run the download command to download the installation script and installation package.

    For more information about the value of ${your_region_name} for each region that can be accessed over the Internet, see Table 1. For example, the value of ${your_region_name} for the China (Hangzhou) region that can be accessed over the Internet is cn-hangzhou-internet.

    wget http://logtail-release-${your_region_name}.oss-${your_region_name}.aliyuncs.com/linux64/logtail.sh
    wget http://logtail-release-${your_region_name}.oss-${your_region_name}.aliyuncs.com/linux64/logtail-linux64.tar.gz
  3. Copy the installation script and installation package to the destination server on which you want to install Logtail.
  4. Replace the ${your_region_name} variable in the command with the value for the region where the project resides, and then run the installation command on the destination server.
    For more information about the value of ${your_region_name} for each region, see Table 1. Examples:
    • The value of ${your_region_name} for the China (Hangzhou) region that can be accessed over the Alibaba Cloud internal network is cn-hangzhou.
    • The value of ${your_region_name} for the China (Hangzhou) region that can be accessed over the Internet is cn-hangzhou-internet.
    • The value of ${your_region_name} for the China (Hangzhou) region that can be accessed by using the global acceleration feature is cn-hangzhou-acceleration.
    chmod +x logtail.sh; ./logtail.sh install-local ${your_region_name}
Note If you want to upgrade Logtail offline, you can download the latest installation package and run the chmod +x logtail.sh; ./logtail.sh upgrade-local command.

View the version of Logtail

Go to the installation directory and open the /usr/local/ilogtail/app_info.json file. The value of the logtail_version field indicates the version of Logtail.
  • Command
    cat /usr/local/ilogtail/app_info.json
  • Response
    {
       "UUID" : "0DF18E97-0F2D-486F-B77F-*********",
       "hostname" : "david*******",
       "instance_id" : "F4FAFADA-F1D7-11E7-846C-00163E30349E_*********_1515129548",
       "ip" : "**********",
       "logtail_version" : "0.16.30",
       "os" : "Linux; 2.6.32-220.23.2.ali1113.el5.x86_64; #1 SMP Thu Jul 4 20:09:15 CST 2013; x86_64",
       "update_time" : "2020-01-05 13:19:08"
    }

Upgrade Logtail

You can use the Logtail installation script logtail.sh to upgrade Logtail. The installation script selects an upgrade method based on the configurations of the Logtail that is installed.
Note During the upgrade, Logtail is temporarily stopped, but no log data is lost. After Logtail is upgraded, only the configuration files and checkpoint files are retained. Other files are overwritten.
  1. Run the following command to upgrade Logtail:
    wget http://logtail-release-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh
    sudo ./logtail.sh upgrade
  2. Check the upgrade result.
    The following sample result indicates that the upgrade is successful:
    Stop logtail successfully.
    ilogtail is running
    Upgrade logtail success
    {
       "UUID" : "***",
       "hostname" : "***",
       "instance_id" : "***",
       "ip" : "***",
       "logtail_version" : "0.16.30",
       "os" : "Linux; 3.10.0-693.2.2.el7.x86_64; #1 SMP Tue Sep 12 22:26:13 UTC 2017; x86_64",
       "update_time" : "2020-08-29 15:01:36"
    }

Start and stop Logtail

  • Start Logtail
    Run the following command as a root user:
    /etc/init.d/ilogtaild start
  • Stop Logtail
    Run the following command as a root user:
    /etc/init.d/ilogtaild stop

Uninstall Logtail

Run the following command to uninstall Logtail:

wget http://logtail-release-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh;chmod 755 logtail.sh;./logtail.sh uninstall