全部产品
存储与CDN 数据库 安全 应用服务 数加·人工智能 数加·大数据基础服务 互联网中间件 视频服务 开发者工具 解决方案 物联网 钉钉智能硬件
日志服务

Linux

更新时间:2018-01-08 23:34:47

支持的系统

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

安装Logtail

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

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

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

ECS经典网络

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

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

  • 华北 2(北京)
  1. wget http://logtail-release-bj.oss-cn-beijing-internal.aliyuncs.com/linux64/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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; chmod 755 logtail.sh; sh logtail.sh install me-east-1_vpc

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

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

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

  • 华北 2(北京)
  1. wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; chmod 755 logtail.sh; sh logtail.sh install ap-southeast-3_internet
  • 亚太东北 1 (日本)
  1. wget http://logtail-release.oss-cn-hangzhou.aliyuncs.com/linux64/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; 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; chmod 755 logtail.sh; sh logtail.sh install me-east-1_internet

ECS 金融云

  • 华东 1(杭州)
  1. wget http://logtail-release-hz-finance.oss-cn-hzjbp-a-internal.aliyuncs.com/linux64/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; 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; 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

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

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