全部产品
弹性计算 会员服务 网络 安全 移动云 数加·大数据分析及展现 数加·大数据应用 管理与监控 云通信 阿里云办公 培训与认证 更多
存储与CDN 数据库 域名与网站(万网) 应用服务 数加·人工智能 数加·大数据基础服务 互联网中间件 视频服务 开发者工具 解决方案 物联网 智能硬件
日志服务

Linux

更新时间:2018-04-16 18:09:46

支持的系统

  • 支持如下版本的Linux x86-64(64位)服务器
    • Aliyun Linux
    • Ubuntu
    • Debian
    • CentOS
    • OpenSUSE

安装Logtail

覆盖安装模式,如之前已安装过Logtail,那么安装器会先执行卸载、删除 /usr/local/ilogtail 目录后再重新安装。安装后默认启动Logtail并注册开机启动。

请根据机器所处的网络环境和日志服务所在Region下载安装器,选择不同参数进行安装。

阿里巴巴集团内部Project请参考内部安装文档

安装方式

安装Logtail只需下载安装脚本并执行即可,您需要根据不同地域、不同网络类型选择对应的安装参数

安装参数

  • 注意: Docker和Kubernetes安装中的${your_region_name} 即为下表中的参数,请直接拷贝。

各region下不同网络环境安装参数如下(建议直接拷贝对应章节的安装方式):

region 经典网 VPC 公网(自建IDC)
华北 2(北京) cn-beijing cn-beijing_vpc cn-beijing_internet
华北 1(青岛) cn-qingdao cn-qingdao_vpc cn-qingdao_internet
华东 1(杭州) cn-hangzhou cn-hangzhou_vpc cn-hangzhou_internet
华东 2(上海) cn-shanghai cn-shanghai_vpc cn-shanghai_internet
华南 1(深圳) cn-shenzhen cn-shenzhen_vpc cn-shenzhen_internet
华北 3(张家口) cn-zhangjiakou cn-zhangjiakou_vpc cn-zhangjiakou_internet
华北 5(呼和浩特) cn-huhehaote cn-huhehaote cn-huhehaote_internet
香港 cn-hongkong cn-hongkong_vpc cn-hongkong_internet
美国西部 1(硅谷) us-west-1 us-west-1_vpc us-west-1_internet
美国东部 1(弗吉尼亚) 无此类型网络 us-east-1 us-east-1_internet
亚太东南 1(新加坡) ap-southeast-1 ap-southeast-1_vpc ap-southeast-1_internet
亚太东南 2(悉尼) ap-southeast-2 ap-southeast-2_vpc ap-southeast-2_internet
亚太东南 3(吉隆坡) ap-southeast-3 ap-southeast-3 ap-southeast-3_internet
亚太东南 5(雅加达) 无此类型网络 ap-southeast-5 ap-southeast-5_internet
亚太南部 1(孟买) 无此类型网络 ap-south-1 ap-south-1_internet
亚太东北 1(日本) ap-northeast-1 ap-northeast-1_vpc ap-northeast-1_internet
欧洲中部 1(法兰克福) eu-central-1 eu-central-1_vpc eu-central-1_internet
中东东部 1(迪拜) me-east-1 me-east-1_vpc me-east-1_internet
华东 1金融云(杭州) 无此类型网络 cn-hangzhou-finance 无此类型网络
华东 2金融云(上海) 无此类型网络 cn-shanghai-finance 无此类型网络
华南 1金融云(深圳) 无此类型网络 cn-shenzhen-finance 无此类型网络

ECS经典网络

数据通过阿里云内网写入日志服务,不消耗公网带宽。适用于阿里云ECS。

  • 注:新开地域(海外、张北等)默认新开通ECS都是VPC网络,请查看VPC部分介绍。

  • 华北 2(北京)

  1. wget http://logtail-release-bj.oss-cn-beijing-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-beijing
  • 华北 1(青岛)
  1. wget http://logtail-release-qd.oss-cn-qingdao-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-qingdao
  • 华东 1(杭州)
  1. wget http://logtail-release.oss-cn-hangzhou-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-hangzhou
  • 华东 2(上海)
  1. wget http://logtail-release-sh.oss-cn-shanghai-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-shanghai
  • 华南 1(深圳)
  1. wget http://logtail-release-sz.oss-cn-shenzhen-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-shenzhen
  • 华北 3 (张家口)
  1. wget http://logtail-release-zjk.oss-cn-zhangjiakou-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-zhangjiakou
  • 华北 5 (呼和浩特)
  1. wget http://logtail-release-huhehaote.oss-cn-huhehaote-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-huhehaote
  • 香港
  1. wget http://logtail-release-hk.oss-cn-hongkong-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-hongkong
  • 美国西部 1 (硅谷)
  1. wget http://logtail-release-us-west-1.oss-us-west-1-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install us-west-1
  • 亚太东南 1 (新加坡)
  1. wget http://logtail-release-ap-southeast-1.oss-ap-southeast-1-internal.aliyuncs.com/linux64/logtail.sh; chmod 755 logtail.sh; sh logtail.sh install ap-southeast-1
  • 亚太东南 2 (悉尼)
  1. wget http://logtail-release-ap-southeast-2.oss-ap-southeast-2-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install ap-southeast-2
  • 亚太东南 3 (吉隆坡)
  1. wget http://logtail-release-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install ap-southeast-3
  • 亚太东北 1 (日本)
  1. wget http://logtail-release-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install ap-northeast-1
  • 欧洲中部 1 (法兰克福)
  1. wget http://logtail-release-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install eu-central-1
  • 中东东部 1 (迪拜)
  1. wget http://logtail-release-me-east-1.oss-me-east-1-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install me-east-1

ECS 专有网络 VPC

数据通过阿里云专有网络写入日志服务。适用于阿里云 ECS VPC。

  • 华北 2(北京)
  1. wget http://logtail-release-bj.vpc100-oss-cn-beijing.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-beijing_vpc
  • 华北 1(青岛)
  1. wget http://logtail-release-qd.vpc100-oss-cn-qingdao.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-qingdao_vpc
  • 华东 1(杭州)
  1. wget http://logtail-release.vpc100-oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-hangzhou_vpc
  • 华东 2(上海)
  1. wget http://logtail-release-sh.vpc100-oss-cn-shanghai.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-shanghai_vpc
  • 华南 1(深圳)
  1. wget http://logtail-release-sz.vpc100-oss-cn-shenzhen.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-shenzhen_vpc
  • 华北 3 (张家口)
  1. wget http://logtail-release-zjk.oss-cn-zhangjiakou-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-zhangjiakou_vpc
  • 华北 5 (呼和浩特)
  1. wget http://logtail-release-huhehaote.oss-cn-huhehaote-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-huhehaote
  • 香港
  1. wget http://logtail-release-hk.vpc100-oss-cn-hongkong.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-hongkong_vpc
  • 美国西部 1 (硅谷)
  1. wget http://logtail-release-us-west-1.vpc100-oss-us-west-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install us-west-1_vpc
  • 美国东部 1 (弗吉尼亚)
  1. wget http://logtail-release-us-east-1.vpc100-oss-us-east-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install us-east-1
  • 亚太东南 1 (新加坡)
  1. wget http://logtail-release-ap-southeast-1.vpc100-oss-ap-southeast-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install ap-southeast-1_vpc
  • 亚太东南 2 (悉尼)
  1. wget http://logtail-release-ap-southeast-2.oss-ap-southeast-2-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install ap-southeast-2_vpc
  • 亚太东南 3 (吉隆坡)
  1. wget http://logtail-release-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install ap-southeast-3
  • 亚太东南 5 (雅加达)
  1. wget http://logtail-release-ap-southeast-5.oss-ap-southeast-5-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install ap-southeast-5
  • 亚太东北 1 (日本)
  1. wget http://logtail-release-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install ap-northeast-1_vpc
  • 欧洲中部 1 (法兰克福)
  1. wget http://logtail-release-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install eu-central-1_vpc
  • 中东东部 1 (迪拜)
  1. wget http://logtail-release-me-east-1.oss-me-east-1-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install me-east-1_vpc
  • 亚太南部 1 (孟买)
  1. wget http://logtail-release-ap-south-1.oss-ap-south-1-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install ap-south-1

公网(自建 IDC 或其它云主机)

数据通过公网写入日志服务,占用公网带宽。适用于非阿里云虚拟机或其它IDC。

日志服务无法获取非阿里云机器的属主信息,请在安装Logtail后手动配置用户标识,参见 非阿里云ECS配置用户标识,否则 Logtail心跳异常、无法收集日志。

  • 华北 2(北京)
  1. wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-beijing_internet
  • 华北 1(青岛)
  1. wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-qingdao_internet
  • 华东 1(杭州)
  1. wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-hangzhou_internet
  • 华东 2(上海)
  1. wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-shanghai_internet
  • 华南 1(深圳)
  1. wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-shenzhen_internet
  • 华北 3 (张家口)
  1. wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-zhangjiakou_internet
  • 华北 5 (呼和浩特)
  1. wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-huhehaote_internet
  • 香港
  1. wget http://logtail-release-hk.oss-cn-hongkong.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-hongkong_internet
  • 美国西部 1 (硅谷)
  1. wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install us-west-1_internet
  • 美国东部 1 (弗吉尼亚)
  1. wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install us-east-1_internet
  • 亚太东南 1 (新加坡)
  1. wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install ap-southeast-1_internet
  • 亚太东南 2 (悉尼)
  1. wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install ap-southeast-2_internet
  • 亚太东南 3 (吉隆坡)
  1. wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install ap-southeast-3_internet
  • 亚太东南 5 (雅加达)
  1. wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh; chmod 755 logtail.sh; sh logtail.sh install ap-southeast-5_internet
  • 亚太东北 1 (日本)
  1. wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install ap-northeast-1_internet
  • 欧洲中部 1 (法兰克福)
  1. wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install eu-central-1_internet
  • 中东东部 1 (迪拜)
  1. wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install me-east-1_internet
  • 亚太南部 1 (孟买)
  1. wget http://logtail-release-ap-south-1.oss-ap-south-1.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install ap-south-1_internet

ECS 金融云

  • 华东 1(杭州)
  1. wget http://logtail-release-hz-finance.oss-cn-hzjbp-a-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-hangzhou-finance
  • 华东 2(上海)
  1. wget http://logtail-release-sh-finance.oss-cn-shanghai-finance-1-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-shanghai-finance
  • 华南 1(深圳)
  1. wget http://logtail-release-sz-finance.oss-cn-shenzhen-finance-1-internal.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh install cn-shenzhen-finance

查看Logtail版本

Logtail会将版本信息记录在/usr/local/ilogtail/app_info.json中的logtail_version字段,例如:

  1. $cat /usr/local/ilogtail/app_info.json
  2. {
  3. "UUID" : "0DF18E97-0F2D-486F-B77F-*********",
  4. "hostname" : "david*******",
  5. "instance_id" : "F4FAFADA-F1D7-11E7-846C-00163E30349E_*********_1515129548",
  6. "ip" : "**********",
  7. "logtail_version" : "0.16.0",
  8. "os" : "Linux; 2.6.32-220.23.2.ali1113.el5.x86_64; #1 SMP Thu Jul 4 20:09:15 CST 2013; x86_64",
  9. "update_time" : "2018-01-05 13:19:08"
  10. }

升级Logtail

升级Logtail和安装的操作步骤一致,如果您已经安装logtail,再次执行升级命令时将自动卸载并安装最新版本的Logtail。

手动启动和停止Logtail

启动

以管理员方式执行:/etc/init.d/ilogtaild start

停止

以管理员方式执行:/etc/init.d/ilogtaild stop

卸载Logtail

参考 安装Logtail 下载安装器 logtail.sh,shell下以管理员权限执行:

  1. wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh; sh logtail.sh uninstall
本文导读目录