This topic describes how to install, upgrade, and uninstall Logtail on a Linux server.
Prerequisites
- At least one Linux server is available.
- The network type required for log collection is determined based on the server type and the region where the server resides. For more information, see Select a network type.
Supported systems
- Aliyun Linux 2
- Red Hat Enterprise Linux 6, Red Hat Enterprise Linux 7, and Red Hat Enterprise Linux 8
- CentOS 6, CentOS 7, and CentOS 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, SUSE Linux Enterprise Server 15
- openSUSE Leap 15.1, openSUSE Leap 15.2, and openSUSE Leap 42.3
- Glibc 2.5 or later
Precautions
- If you have installed Logtail, the installer uninstalls the existing version of Logtail, deletes the /usr/local/ilogtail directory, and then reinstalls Logtail. By default, Logtail runs after it is installed and launches when the system reboots.
- If the installation fails, submit a ticket.
- After Logtail is installed, you must update the Logtail configuration if the network type of the ECS instance is switched from the classic network to Virtual Private Cloud (VPC). For more information, see Do I need to update Logtail settings after the network type is changed?.
Installation methods
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-Beijing Winter Olympics) | 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. For more information about the metadata of the ECS instance, see Metadata.
- Download the Logtail installation script over the Internet.
The download generates about 10 KB Internet traffic.
wget http://logtail-release-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh;chmod 755 logtail.sh
- Install Logtail by using the auto parameter.
You can run the following command in PowerShell or Command Prompt to install Logtail. The Logtail installation package of the corresponding region is automatically downloaded. The download does not generate Internet traffic.
./logtail.sh install auto
- Download the Logtail installation script over the Internet.
- If you have identified the region where the ECS instance resides, select the installation
command that corresponds to the region.
Download the Logtail installation script by using the internal network. The download does not generate Internet traffic.
- Obtain the value of the
${your_region_name}
parameter for the region where the project resides.For more information about the value of the
${your_region_name}
parameter for each region, see Region names for Logtail installation. For example, the value of the${your_region_name}
parameter for the China (Hangzhou) region iscn-hangzhou
. - Replace the
${your_region_name}
parameter with the actual region name, 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 lists the installation commands that correspond to each region where the 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-Beijing Winter Olympics) 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
- Obtain the value of the
Install Logtail over the Internet
Region | Installation command |
---|---|
China (Hangzhou) |
|
China (Shanghai) |
|
China (Qingdao) |
|
China (Beijing) |
|
China (Zhangjiakou-Beijing Winter Olympics) |
|
China (Hohhot) |
|
China (Ulanqab) |
|
China (Shenzhen) |
|
China (Heyuan) |
|
China (Guangzhou) |
|
China (Chengdu) |
|
China (Hong Kong) |
|
US (Silicon Valley) |
|
US (Virginia) |
|
Singapore (Singapore) |
|
Australia (Sydney) |
|
Malaysia (Kuala Lumpur) |
|
Indonesia (Jakarta) |
|
Japan (Tokyo) |
|
Germany (Frankfurt) |
|
UAE (Dubai) |
|
India (Mumbai) |
|
UK (London) |
|
Russia (Moscow) |
|
Install Logtail by using the global acceleration feature
Region | Installation command |
---|---|
China (Beijing) |
|
China (Qingdao) |
|
China (Hangzhou) |
|
China (Shanghai) |
|
China (Shenzhen) |
|
China (Heyuan) |
|
China (Guangzhou) |
|
China (Zhangjiakou-Beijing Winter Olympics) |
|
China (Hohhot) |
|
China (Ulanqab) |
|
China (Chengdu) |
|
China (Hong Kong) |
|
US (Silicon Valley) |
|
US (Virginia) |
|
Singapore (Singapore) |
|
Australia (Sydney) |
|
Malaysia (Kuala Lumpur) |
|
Indonesia (Jakarta) |
|
Japan (Tokyo) |
|
Germany (Frankfurt) |
|
UAE (Dubai) |
|
India (Mumbai) |
|
UK (London) |
|
Russia (Moscow) |
|
View the version of Logtail
logtail_version
field shows the version of Logtail. $cat /usr/local/ilogtail/app_info.json
{
"UUID" : "0DF18E97-0F2D-486F-B77F-*********",
"hostname" : "david*******",
"instance_id" : "F4FAFADA-F1D7-11E7-846C-00163E30349E_*********_1515129548",
"ip" : "**********",
"logtail_version" : "0.16.0",
"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" : "2018-01-05 13:19:08"
}
Upgrade Logtail
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 download the Logtail installation script (logtail.sh) and 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